Answers for "c program to find average of 3 numbers"

C
3

c program to find average of 3 numbers

#include <stdio.h>

int main(void) 
{
  // these numbers can be whatever you want
  int number = 1231231;
  int number2 = 1231232;
  int number3 = 1;
  
  // add up all the numbers you want to average, then divide it by the total amount of numbers. In this case there are 3 numbers, so you divide it by three.
  int average = number + number2 + number3 / 3;
    
  // prints the average
  printf("%i", average);
}
Posted by: Guest on December-16-2020

Code answers related to "c program to find average of 3 numbers"

Code answers related to "C"

Browse Popular Code Answers by Language