-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.cpp
More file actions
41 lines (29 loc) · 824 Bytes
/
main.cpp
File metadata and controls
41 lines (29 loc) · 824 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
31
32
33
34
35
36
37
38
39
40
41
#include <iostream>
using namespace std;
#include "stringfuncs.h"
int main()
{
char myString[100] = "My work is related to Comp Science. I like Comp Science.";
char substr[10] = "Comp";
cout << myString << endl;
findAndReplace(myString, substr, "Computer");
cout << myString << endl;
char num[20];
longToStr(-23, num);
cout << num << endl;
doubleToStr(-29.999, num, 2, true);
cout << num << endl;
doubleToStr(-29.999, num, 2, false);
cout << num << endl;
doubleToStr(-9.99, num, 1, true);
cout << num << endl;
doubleToStr(-0.999, num, 2, true);
cout << num << endl;
doubleToStr(-0.999, num, 0, true);
cout << num << endl;
doubleToStr(-0.999, num, 0, false);
cout << num << endl;
doubleToStr(-0.099, num, 1, false);
cout << num << endl;
return 0;
}