1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145
|
#include <iostream.h>
int main()
{
float a, b, c, d, e, f, g, h, z, y, i, q, w;
char o;
cout<<"what you wanna do???\n";
cin>>q;
if (q==1)
{
for(w=1;(w<=10);w=++w)
{
system("CLS");
cout<<"first side\n";
cin>>a;
cout<<"second side\n";
cin>>b;
cout<<"third side\n";
cin>>c;
if ((a>b)&&(a>c))
{
d=b+c;
if (d>a)
cout<<"triangle is valid\n";
else
cout<<"it is not valid\n";
system("pause");
}
else if((b>c)&&(b>a))
{
d=c+a;
if(d>b)
cout<<"triangle is valid\n";
else
cout<<"triangle not valid\n";
system("pause");
}
else if((c>a)&&(c>b))
{
d=a+b;
if(d>c)
cout<<"triangle is valid\n";
else
cout<<"triangle not valid\n";
system("pause");
}
}
}
else if (q==2)
{
w=1;
while(w<=10)
{
system("CLS");
cout<<"tell 1 side\n";
cin>>a;
cout<<"2nd\n";
cin>>b;
cout<<"and 3rd\n";
cin>>c;
if((a==b)&&(b==c)&&(c==a))
cout<<"equilatera; triangle\n";
else if((a==b&&a!=c)||(b==c&&b!=a)||(a==c&&c!=b))
cout<<"iscosceles\n";
else if((a!=b)||(a!=c)||(b!=c))
cout<<"scalene\n";
w=++w;
system("pause");
}
}
else if(q==3)
{
w=1;
while(w<=12)
{
system("CLS");
cout<<"enter the total number of marks\n";
cin>>h;
cout<<"the total number of subjects??\n";
cin>>i;
cout<<"subject 1:\n";
cin>>a;
cout<<"sunbject 2\n";
cin>>b;
cout<<"subject3\n";
cin>>c;
cout<<"subject4\n";
cin>>e;
cout<<"subject5\n";
cin>>f;
g=a+b+c+d+e+f;
z=h*i;
y=(g/z)*100;
cout<<"percentage is "<<y<<"%";
w=++w;
system("pause");
}
else if(q==4)
{
system("pause");
for(w=1;(w<=190);w=++w)
{
system("pause");
system("CLS");
cout<<"ohk you want the calculator\nno problem we habe got it TOO!!haha\nthen lets get started\n";
cout<<"what do you want to do?\n";
cin>>o;
if(o=='A')
{
cout<<"enter first number";
cin>>a;
cout<<"ENTER SECOND NUMBER";
cin>>b;
cout<<"enter third number";
cin>>c;
d=a+b+c;
cout<<"there you go, so the sum is:"<<d;
system("pause");
}
if(o='M')
{
cout<<"enter the first number";
cin>>a;
cout<<"enter the second number";
cin>>b;
c=a*b;
cout<<"the product is"<<c<<"\n";
system("pause");
}
else if(o='D')
{
cout<<"enter the first number";
cin>>a;
cout<<"enter the second number";
cin>>b;
c=a/b;
cout<<"the quotient is"<<c<<"\n";
system("pause");
}
}
}
}
return 0;
}
|