C-Programming
write a program in c to find average number??
write a program in c to find average number??
#include<stdio.h>
#include<conio.h>
main()
{
int num,i,term,sum=0,avg;
clrscr();
printf("how many numbers do want to average")
scanf("%f",&num);
for(i=1;i<=term;i++);
{
printf("enter the number")
sum=sum+num;
}
avrage=sum/term;
printf("the avrage is "f".\n"avrage");
}
DizIT_Operators
Thank-You
write a program in c to find average number??
Code:-
#include<conio.h>
main()
{
int num,i,term,sum=0,avg;
clrscr();
printf("how many numbers do want to average")
scanf("%f",&num);
for(i=1;i<=term;i++);
{
printf("enter the number")
sum=sum+num;
}
avrage=sum/term;
printf("the avrage is "f".\n"avrage");
}
DizIT_Operators
Thank-You
No comments:
Post a Comment