#include "stdio.h"
#include "stdlib.h"
#include "time.h"
main()
{ int op1=0,op2=0,pupil=0,answer=0,right=0,total=0;
float rate=0.0;
randomize();
do
{ op1=random(100);
op2=random(100);
printf("%d+%d=",op1,op2);
scanf("%d",&pupil);
answer=op1+op2;
if(answer==pupil)
right++;
else
printf("Wrong/n");
total++;
}while(right<5);
rate=(float)right/total*100;
printf("The correct rate is:%f/n",rate);
getch();
}