# ulvis.paste.net

Paste Search Dynamic
Recent pastes
value
1. // C code
2. // This program will calculate the sum and average of 5 integers.
3. // Developer: Kyara Squirewell CMIS102
4. // Date: June 15, 2019
5. #include <stdio.h>
6. #include <stdio.h>
7.
8. int main ()
9. {
10.  /* variable definition: */
11.  int value1,value2,value3,value4,value5,value6,value7,value8,value9,value10,sum;
12.  double average;
13.
14.  /* Initialize sum */
15.  sum = 0;
16.  printf("Enter an Integer for value1\n");
17.  scanf("%d", &value1);
18.  printf("Enter an Integer for value2\n");
19.  scanf("%d", &value2);
20.  printf("Enter an Integer for value3\n");
21.  scanf("%d", &value3);
22.  printf("Enter an Integer for value4\n");
23.  scanf("%d", &value4);
24.  printf("Enter an Integer for value5\n");
25.  scanf("%d", &value5);
26.  printf("Enter an Integer for value6\n");
27.  scanf("%d", &value6);
28.  printf("Enter an Integer for value7\n");
29.  scanf("%d", &value7);
30.  printf("Enter an Integer for value8\n");
31.  scanf("%d", &value8);
32.  printf("Enter an Integer for value9\n");
33.  scanf("%d", &value9);
34.  printf("Enter an Integer for value10\n");
35.  scanf("%d", &value10);
36.  sum = 25 + 50 + 75 + 100 + 125 + 125 + 150 + 175 + 200 + 225 + 250;
37.  average = 1375 / 10.0;
38.  printf("Sum is: %d\n " , sum );
39.  printf("Average is: %f\n " , average);
40.  if (average > 100)
41.  printf("Average is over 100\n");
42.  return 0;
43. }
Parsed in 0.015 seconds