-
Notifications
You must be signed in to change notification settings - Fork 0
/
QUEIS.CPP
38 lines (37 loc) · 871 Bytes
/
QUEIS.CPP
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
#include<iostream.h>
#include<conio.h>
int main()
{
long int i,n,qst,corect,sum,id;
clrscr();
cout<<"Enter Number Of Students:";
cin>>n;
for (i=1;i<=n;i++)
{
cout<<"\nEnter Your ID:";
cin>>id;
cout<<"\nEnter Javabhay Sahih be so'alat(0-20):";
cin>>corect;
if ((corect<0) || (corect>20))
{
cout<<"\njavab ha hkarej az mahdode bod!!!";
cout<<"\nEnter Javabhay Sahih be so'alat(0-20):";
cin>>corect;
}
cout<<"\nEnter tedad javabhaye dade shode be so'alat(0-20):";
cin>>qst;
if ((qst<0) || (qst>20))
{
cout<<"\njavab ha hkarej az mahdode bod!!!";
cout<<"\nEnter tedad javabhaye dade shode be so'alat(0-20):";
cin>>qst;
}
clrscr();
cout<<"\nJavabhay Sahih : "<<corect<<endl;
cout<<"\nJavabhay Ghalat: "<<qst-corect<<endl;
sum=(corect*3)-(qst-corect);
cout<<"\nNomre Daneshjoo :"<<sum<<endl;
}
getch();
return 0;
}