Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<stdio.h>
- #include<stdlib.h>
- #include<string.h>
- #define brprasanja 10
- int main()
- {
- int kluc[brprasanja],odgovori[brprasanja];
- int bod=0,i,j=1;
- char c;
- printf("Vnesete gi tocnite odgovori:\n");
- for(i=0;i<brprasanja;i++)
- {
- scanf("%d",&odgovori[i]);
- }
- printf("Vnesuvaj gi odgovorite na studentite:\n");
- while(c!='.'){
- for(i=0;i<brprasanja;i++)
- {
- scanf("%d",&odgovori[i]);
- if((odgovori[i]>=1) && (odgovori[i]<=5))
- {
- if(odgovori[i]==kluc[i])
- {
- bod=bod+2;
- }
- else
- bod=bod-1;
- }
- printf("\nStudent %d: %d bodovi\n",j,bod);
- j++;
- printf("Sleden student(tochka za kraj)\n");
- c=getchar();
- }
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement