Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 6

// ConsoleApplication2.cpp : Defines the entry point for the console application.

//

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

// ConsoleApplication3.cpp : Defines the entry point for the console application.


//

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

int main()
{
int x;
int c_p = 0;
int c_n = 0;
int c_z = 0;

for (int i = 1;i <= 10;i++)


{
cin >> x;
if (x == 0)
c_z++;
if (x > 0)
c_p++;
if (x < 0)
c_n++;

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

You might also like