Translate

Bu Blogda Ara

18 Haziran 2016 Cumartesi

Başarılı başarısız sayaç





#include <stdio.h>
#include <stdlib.h>
int main() {
               int res,counter=1,basari=0,fail=0;                          
                while(counter<=10){
               printf("Lutfen Sonucunuzu Giriniz.\n(Gecti Iseniz 1 Kaldi Iseniz 2 Giriniz)");
                                               scanf("%d",&res);                         
                                               if(res==1){                                                        
                                                               basari++;                                                           
                                               }
                                               else if(res==2){                                                              
                                                               fail++;                                                 
                                               }                             
                                               counter++;                                       
                               }
                               if(basari>=8){
                                               printf("Bonus to Instructor\n");                                             
                               }
                               printf("Basarili Sayisi:%d\n",basari);
                               printf("Kalan Sayisi:%d",fail);                   
               
                return 0;
               

}

Hiç yorum yok:

Yorum Gönder