Discussion Forums

New User? Please read instructions!

C program to find sum and average of given 3 numbers  

  RSS

thiyagarajan
Eminent Member
Joined: 8 months  ago
Posts: 26
27/01/2017 9:33 am  

Need C program to find sum and average of given 3 numbers


ReplyQuote
admin
Eminent Member
Joined: 5 years  ago
Posts: 26
31/01/2017 10:51 am  

Hi Thiyagarajan, please use below C program to find sum and average of given 3 numbers.

 

#include<stdio.h>

int main()

{

  int a,b,c, sum;

  float d;

  printf("Please enter 3 numbers");

  scanf("%d%d%d",&a,&b,&c);

  sum=a+b+c;

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

  printf("\nSum is %d", sum);

  printf("\nAverage is  %f",d);

  return 0;

}

Edited: 8 months  ago

ReplyQuote
  
Working

Please Login or Register

1. Online Compilers - Compile & Run your C/C++ programs:

✅ Online Compilers

2. Ask your questions or clarify your/others doubts from,

✅ Online Discussion Forums by Fresh2Refresh.com





Share this website !!!
Facebook Twitter Linkedin

Close
We Support JALLIKATTU !!!
We Support JALLIKATTU!
By Fresh2Refresh.com
Show Your Support as well. Thanks!