https://onlinegdb.com/SJFmMIRvX
#include <iostream>
#include <string.h>
#include <iomanip>
#include <stddef.h>
#include <math.h>
///////////////////
using namespace std;
//////////////////
//simple call request with nothing fancy using c++98 basics
void Data_type_1() {
//Delete setsw if it looks odd or play around with it.
cout << setw(109)<< "Hello <(^_^,)/n" << endl;
cout << setw(120)<<"-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+|"<<endl;
}
void Data_type_2()
{ //flush flushes the formating of text.
cout<<setw(5)<<"welcome:"<<endl<< "please type your name:"<<flush;
// here we decare name a string, and pass in the data, like your name, we then get cin to take the users name
string name = name;
cin >> name;
if (name == name){
// then we out put the users name on the right side.
cout<<"--------------hi-------------|"<<name<<endl;
cout << setw(35)<< "//^_^)> Pass|" << endl;
cout<<"----------------------------------|"<<endl;
cout<<setw(21)<< setprecision(0) <<sizeof(name)
<<":bytes|96bits|information"<<endl;
}else if(name != name){
cout<<"---------------------------------------------|"<<endl;
cout << setw(116)<< " error1| " << endl;
cout<<"---------------------------------------------|"<<endl;
}
return;
}
void Data_type_3()
{
int sum1;
cout<<"-+-+-+-+-+please-type--two numbers+-+-<(*-*)+-|"<< endl;
cout << setw (9) << "Number: "<< flush;
cin >> sum1;
char cal;
cout << "+-+-+-+-+-+-+-enter+-+-+-+-+-+-+-+-+-+-+-+-|"<< endl;
cout<<setw(9)<<
"Multiply[*]"<<
"Subtract[-]"<<
"Addition[+]"<<
"Divide[/]"<<endl;
cout <<"Here-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-|"<< endl;
cout << "^(*-*)>:"<<flush;
cin >> cal;
int sum2;
cout << "-+-+-+-+-+-+-+-+-+-+-+|" << endl;
cout << setw (9) << "Number: "<< flush;
cin >> sum2;
cout << "-+-+-+-+-+-+-+-+-|"<< endl;
cout << setw(9) << "Result: "<< flush;
switch(cal) {
// a switch must have a char a alphbet not a word.
case '-':
// just like in algebra two values are passed from the right to be calculated by the user or program.
cout << sum1-sum2;
break;
case '+':
cout << sum1+sum2;
break;
case '*':
cout << sum1*sum2;
break;
case '%':
cout << sum1/sum2;
}
}
int main ()
{
//each data type is being called.
Data_type_1();
Data_type_2();
Data_type_3();
return 0;
};