#include "stdafx.h"
#include "iostream"
using namespace std;
int main()
{
int x, y;
cout << "please enten number1"<<endl;
cin >> x;
cout << endl << "please enter number2" << endl;
cin >> y;
cout << endl;
cout << "plus is:" << x + y << endl;
cout << "subtract is :" << x - y << endl;
cout << "multiply is :" << x*y << endl;
cout << "quotient is :" << x / y << endl;
cout << "residue is :" << x%y << endl;
system("pause");
return 0;
}
#include "stdafx.h"
#include "iostream"
using namespace std;
int main()
{
int x = 60, y = 7;
cout << "plus is:" << x + y << endl;
cout << "subtract is :" << x - y<<endl;
cout << "multiply is :" << x*y << endl;
cout << "quotient is :" << x/y << endl;
cout << "residue is :" << x%y << endl;
system("pause");
return 0;
}
توضیحات در فایل
#include "stdafx.h"
#include "iostream"
using namespace std;
int main()
{
int x;
cout << "action for a is:12345" << "\a" << " 6789" << endl;
cout << "action for b is:12345" << "\b" << " 6789" << endl;
cout << "action for n is:12345" << "\n" << " 6789" << endl;
cout << "action for r is:12345" << "\r" << " 6789" << endl;
cout << "action for t is:12345" << "\t" << " 6789" << endl;
cout << "action for v is:12345" << "\v" << " 6789" << endl;
cout << "action for ' is:12345" << "\'" << " 6789" << endl;
cout << "action for \" is:12345" << "\"" << " 6789" << endl;
cout << "action for double \ is:12345" << "\\" << " 6789" << endl;
cout << "action for is:12345" << "\?" << " 6789" << endl;
system("pause");
return 0;
}
در این فایل برنامه به صورت لاین های جدا نوشته شده که به راحتی قابل تغییر باشد
#include "stdafx.h"
#include "iostream"
using namespace std;
int main()
{
cout << "*****" << endl;
cout << "* *" << endl;
cout << "* *" << endl;
cout << "* *" << endl;
cout << "* *" << endl;
cout << "* *" << endl;
cout << "*****" << endl;
system("pause");
return 0;
}