C Language "Float"
include "stdio.h"
include "conio.h"
int main()
{
int notlar[10]={0};
int toplam=0;
float ortalama;
/*notlar[0]=15;
notlar[1]=35;
notlar[9]=45;
notlar[5]=55;
printf("%d\n",notlar[1]);
printf("%d\n",notlar[5]);
printf("%d\n",notlar[7]);
printf("%d\n",notlar[9]);*/
for(int i=0;i<10;i++)
{
printf("Dizinin %d. index giriniz : ",i);
scanf("%d",¬lar[i]);
toplam+=notlar[i];
}
ortalama=toplam/(10*1.0);
printf("\nNot ortalamasi= %f",ortalama);
/*for(int i=0;i<10;i++)
{
printf("%d -\t", notlar[i]);
}*/
getche();
}
Written by Ozan Sigurjónsson
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#C
Authors
Related Tags
#c
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#