Watch in youtube
#include
#include
using namespace std;
int main()
{
int serial=100,digit,digit2,digit3,checkdigit,uid[20],age[20],noofrun[20],participant,recuid[20],starthour,startmin,startsec,finishhour,finishmin,finishsec,durationinsec,fast1,fast2,fast3,startinsec,finishinsec;
float pbtime[20],durationinmin[20];
std::string name[20],recname1,recname2,recname3,recordfound;
for (int registe=1;registe<=2;registe++)
{
digit=serial/100;
digit2=(serial/10)-(digit*10);
digit3=(serial%10);
checkdigit=10-((digit*4)+(digit2*3)+(digit3*2))%10;
uid[registe]=(serial*10)+checkdigit;
cout<<"Your register ID is "< cout<<"\nEnter your age: ";
cin>>age[registe];
do {
if(age[registe]<4 age="" registe="">14)4>
{
cout<<"\n Eligible age between 4 to 14, enter again: ";
cin>>age[registe];
}
}while(age[registe]<4 age="" registe="">14);4>
cout<<"\nEnter your name: ";
cin>>name[registe];
pbtime[registe]=100.00;
noofrun[registe]=0;
serial=serial+1;
}
for (int record=1;record<=20;record++)
{
do{
cout<<"enter participant uid";
cin>>participant;
for (int idcheck=1;idcheck<=20;idcheck++)
{
if (participant==uid[idcheck])
{
cout<<"You already registered";
if (recuid[record]!=participant)
{
recuid[record]=participant;
recordfound="yes";
idcheck=20;
}
else{cout<<"You have already participated";
} }else { recordfound="no";}}
}while (recordfound=="no");
cout<<"Enter starttime and finishtime in HH MM SS ";
cin>>starthour>>startmin>>startsec;
while (starthour<0 starthour="">23 || startmin<0 startmin="">59 || startsec<0 startsec="">59)0>0>0>
{
cout<<"\n You have entered incorrect time, Enter again: ";
cin>>starthour>>startmin>>startsec;
}
cin>>finishhour>>finishmin>>finishsec;
while (finishhour<0 finishhour="">23 || finishmin<0 finishmin="">59 || finishinsec<0 finishinsec="">59)0>0>0>
{
cout<<"\n You have entered incorrect time, Enter again: ";
cin>>finishhour>>finishmin>>finishsec;
}
startinsec=(starthour*3600)+(startmin*60)+startsec;
finishinsec=(finishhour*3600)+(finishmin*60)+finishsec;
durationinsec=finishinsec-startinsec;
durationinmin[record]=int (durationinsec/60)+(durationinsec%60);
noofrun[record]=noofrun[record]+1;
if (durationinmin[record] {
pbtime[record]=durationinmin[record];}
if(noofrun[record]==11)
{
cout<<"You are awarded half wristband"<
}
else{
}
if (noofrun[record]==22)
{
cout<<"You Have been awarded full wristband"<
else{
}
if (age [record]>=4 && age[record]<=6)
{
if (durationinmin[record] {fast1=durationinmin[record];
recname1=name[record];
}
}
if (age [record]>=7 && age[record]<=10)
{
if (durationinmin[record] {fast2=durationinmin[record];
recname2=name[record];
}
}
if (age [record]>=11 && age[record]<=14)
{
if (durationinmin[record] {fast3=durationinmin[record];
recname3=name[record];
}
}
}
}
#include
#include
using namespace std;
int main()
{
int serial=100,digit,digit2,digit3,checkdigit,uid[20],age[20],noofrun[20],participant,recuid[20],starthour,startmin,startsec,finishhour,finishmin,finishsec,durationinsec,fast1,fast2,fast3,startinsec,finishinsec;
float pbtime[20],durationinmin[20];
std::string name[20],recname1,recname2,recname3,recordfound;
for (int registe=1;registe<=2;registe++)
{
digit=serial/100;
digit2=(serial/10)-(digit*10);
digit3=(serial%10);
checkdigit=10-((digit*4)+(digit2*3)+(digit3*2))%10;
uid[registe]=(serial*10)+checkdigit;
cout<<"Your register ID is "<
cin>>age[registe];
do {
if(age[registe]<4 age="" registe="">14)4>
{
cout<<"\n Eligible age between 4 to 14, enter again: ";
cin>>age[registe];
}
}while(age[registe]<4 age="" registe="">14);4>
cout<<"\nEnter your name: ";
cin>>name[registe];
pbtime[registe]=100.00;
noofrun[registe]=0;
serial=serial+1;
}
for (int record=1;record<=20;record++)
{
do{
cout<<"enter participant uid";
cin>>participant;
for (int idcheck=1;idcheck<=20;idcheck++)
{
if (participant==uid[idcheck])
{
cout<<"You already registered";
if (recuid[record]!=participant)
{
recuid[record]=participant;
recordfound="yes";
idcheck=20;
}
else{cout<<"You have already participated";
} }else { recordfound="no";}}
}while (recordfound=="no");
cout<<"Enter starttime and finishtime in HH MM SS ";
cin>>starthour>>startmin>>startsec;
while (starthour<0 starthour="">23 || startmin<0 startmin="">59 || startsec<0 startsec="">59)0>0>0>
{
cout<<"\n You have entered incorrect time, Enter again: ";
cin>>starthour>>startmin>>startsec;
}
cin>>finishhour>>finishmin>>finishsec;
while (finishhour<0 finishhour="">23 || finishmin<0 finishmin="">59 || finishinsec<0 finishinsec="">59)0>0>0>
{
cout<<"\n You have entered incorrect time, Enter again: ";
cin>>finishhour>>finishmin>>finishsec;
}
startinsec=(starthour*3600)+(startmin*60)+startsec;
finishinsec=(finishhour*3600)+(finishmin*60)+finishsec;
durationinsec=finishinsec-startinsec;
durationinmin[record]=int (durationinsec/60)+(durationinsec%60);
noofrun[record]=noofrun[record]+1;
if (durationinmin[record]
pbtime[record]=durationinmin[record];}
if(noofrun[record]==11)
{
cout<<"You are awarded half wristband"<
}
else{
}
if (noofrun[record]==22)
{
cout<<"You Have been awarded full wristband"<
else{
}
if (age [record]>=4 && age[record]<=6)
{
if (durationinmin[record]
recname1=name[record];
}
}
if (age [record]>=7 && age[record]<=10)
{
if (durationinmin[record]
recname2=name[record];
}
}
if (age [record]>=11 && age[record]<=14)
{
if (durationinmin[record]
recname3=name[record];
}
}
}
}
hey can u send me the link for the question paper of this prerelease.
ReplyDelete