Skip to content

Commit

Permalink
C_Tut_14
Browse files Browse the repository at this point in the history
Moar math
  • Loading branch information
Nodetails committed Oct 11, 2015
1 parent b98cfdc commit ab4c4b5
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions C/14_cProgramming.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@

// Moar math.

#include <stdio.h>
#include <stdlib.h>


int main()
{

float age1, age2, age3, average;
age1 = age2 = 4.0;

printf("Enter your age\n");
scanf("%f", &age3);

average = (age1 + age2 + age3) / 3;
printf("\n The average age of the group is %f", average);

return 0;
}

0 comments on commit ab4c4b5

Please sign in to comment.