#include 〈stdio.h〉
#include 〈stdlib.h〉
#define NORMAL 10
#define HARDER NORMAL*NORMAL
#define PASS 50
int study(int);
int main(){
int counter=0;
int time_to_study, result;
do{
time_to_study+=study(HARDER);
counter+=1;
result=(rand() % 50)+1;
}while(result!=PASS);
printf("Level of difficulty for Engineering course: %d\n", counter);
printf("Total study time needed: %d hours.\n", time_to_study);
return 0;
}
int study(int effort){
int i;
for(i=0;i〈effort;i++);
return i;
}
9 comments:
study enginering till sot jor...
lolzzz
haiz...
zha dao
zha your head
Too stressed up...
每一科都不是人读的 = =
lol
using C# programming to interpret what's engineering...
great...
it's only C actually, I not even know how to implement correctly in C++, don't say bout C#
Post a Comment