שפת C/פעולות חשבוניות/תרגילים: הבדלים בין גרסאות בדף

תוכן שנמחק תוכן שנוסף
אין תקציר עריכה
Atavory (שיחה | תרומות)
מ עריכה - עדיף לדעתי להמנע מהמרות בשלב זה
שורה 139:
int main()
{
int sum=78+84+45+97+64, amount=5; //sum is the sum of the grades, and amount is the amount of grades
float sum=78+84+45+97+64;
int amount=5;
float average=(float) sum/amount;
printf("%f\n", average);