کامپیوتر

بایگانی
آخرین مطالب

۳۶ مطلب در بهمن ۱۳۹۶ ثبت شده است

  • ۰
  • ۰

فایل cpp

فایل متنی


#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;

}

  • علی دوران
  • ۰
  • ۰

فایل cpp

فایل متنی

#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;

}

  • علی دوران
  • ۰
  • ۰

توضیحات در فایل

فایل cpp

فایل متنی



#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;

}


  • علی دوران
  • ۰
  • ۰

در این فایل برنامه به صورت لاین های جدا نوشته شده که به راحتی قابل تغییر باشد

فایل cpp

فایل متنی


#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;

}

  • علی دوران
  • ۰
  • ۰

فایل cpp

فایل متنی


#include "stdafx.h"

#include "iostream"

using namespace std;


int main()

{

cout << "*****" << endl << "*   *" << endl << "*   *" << endl << "*****" << endl << "*   *" << endl << "*   *" << endl << "*****";

system("pause");

return 0;

}


  • علی دوران
  • ۱
  • ۰
توضیحات در فایل های ضمیمه


#include "stdafx.h"
#include "iostream"
using namespace std;

int main()
{
char x;
short int A = 65, a = 97;
for (short int i = 0; i < 26; i++) {
x = A;
A++;
cout << x;
x = a;
a++;
cout << x<<" ";
}
system("pause");                    
return 0;
}

  • علی دوران