Computer Science, asked by rollauday, 3 months ago

write an c
program to find average of marks obtained by a student in three subjects​

Answers

Answered by CoderRishav
1

Explanation:

#include <stdio.h>

int main(void) {

int sub1 ,sub2 ,sub3;

scanf("%d",&sub1);

scanf("%d",&sub2);

scanf("%d",&sub3);

printf("Average - %f", (sub1 + sub2 + sub3) / 3.0));

}

Answered by sumanhalder08
1

Explanation:

#include<stdio.h>

#include<conio.h>

void main()

{

int a,b,c;

float avg;

clrscr();

printf("Enter marks of 1st subject:");

scanf("%d",&a);

printf("Enter marks of 2nd subject:");

scanf("%d",&b);

printf("Enter marks of 3rd subject:");

scanf("%d",&c);

avg=(a+b+c)/3;

printf("Average mark is=%f", avg);

getch();

}

Similar questions