generated from github/codespaces-blank
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathutils.cpp
More file actions
30 lines (28 loc) · 815 Bytes
/
utils.cpp
File metadata and controls
30 lines (28 loc) · 815 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#include <iostream>
using namespace std;
class Utils {
public:
// Print function
static void print(string message) {
cout << message << endl;
};
// Take input function
static string input(string message) {
string input;
cout << message;
cin >> input; // cin is used to take input from the console (basically C INput)
return input;
};
// Sum of two numbers function
static int sum(int a, int b) {
return a + b;
};
// Subtract of two numbers function
static int subtract(int a, int b) {
return a - b;
};
// Multiply of two numbers function
static int multiply(int a, int b) {
return a * b;
};
};