C De Bir Sınıftaki Öğrencilerin Not Ortalamalarını Hesaplama

C De Bir Sınıftaki Öğrencilerin Not Ortalamaları Nasıl Hesaplanır?

#include <stdio.h>

int main(void){
unsigned int counter;
int grade;
int total;
int average;

total = 0;
counter = 1;

printf(“%s”, “Enter grade: “);
scanf(“%d”, &grade);
printf(“Number can not be grater than 100”);
printf(“Number can not be smaller than 0”);
total += grade;
counter += 1;
average = total/5;
printf(“Average note of the class is %d”, average);

Leave a Reply

Your email address will not be published. Required fields are marked *