Professional Documents
Culture Documents
"Stdafx.h" : #Include #Include Using Namespace Int Int
"Stdafx.h" : #Include #Include Using Namespace Int Int
//
#include "stdafx.h"
#include <iostream>
using namespace std;
int main()
{
int a,i,x;
cout << "enter number" << endl;
cin >> a;
cout << "enter limit" << endl;
cin >> i;
for (x = 10;x >= 1;x--)
{
cout << a << "*" << x << "=" << (x*a) << endl;
}
system("pause");
return 0;
}
// ConsoleApplication3.cpp : Defines the entry point for the console application.
//
#include "stdafx.h"
#include <iostream>
using namespace std;
int main()
{
for (int i = 1;i <= 6;i++)
{
for (int j = 1;j <= i; j++)
{
cout << "*";
} cout << endl;
}
system("pause");
return 0;
}
#include "stdafx.h"
#include <iostream>
using namespace std;
int main()
{
int x;
int c_p = 0;
int c_n = 0;
int c_z = 0;
}
cout <<"Positive values are: "<<c_p << endl <<"Negative values are: "<< c_n <<
endl <<"zero values are: "<< c_z << endl;
system("pause");
return 0;
}
// ConsoleApplication3.cpp : Defines the entry point for the console application.
//
#include "stdafx.h"
#include <iostream>
using namespace std;
int main()
{
char ch = 1;
for (int i = 1; i <= 15000;i++)
{ cout << ch;
}
system("pause");
return 0;
}
// ConsoleApplication3.cpp : Defines the entry point for the console application.
//
#include "stdafx.h"
#include <iostream>
using namespace std;
int main()
{
int n, d1, d2, d3, temp;
for (n = 100; n <= 999; n++)
{
d1 = n % 10;
temp = n / 10;
d2 = temp % 10;
d3 = temp / 10;
int z;
z = (d1*d1*d1) + (d2*d2*d2) + (d3*d3*d3);
if (n == z)
cout << n << endl;
system ("pause");
return 0;
}