8 Aralık 2011 Perşembe

C programlama

öğrenci sayınına gore not hesablama....
#include <stdio.h>
#include <conio.h>
int main()
{
int i, ogr_say, not_top, not1;
  float ort;
  not_top = 0;
  i = 0;
  printf("Öğrenci sayısını giriniz "); scanf("%d", &ogr_say);
  while (i < ogr_say) {
 printf("Sıradaki öğrencinin notu  = "); scanf("%d", &not1);
 not_top = not_top + not1;
 i = i + 1;
   }
   ort = float (not_top) / ogr_say;
   printf("Ortalama = &f\n", ort); 
 
getch ();
return 0;
}
..........daha fazla bilgi için iletşimden mail..atabilirsiniz..

Hiç yorum yok:

Yorum Gönder