Need this written in C Just C not c or c just plain C Spring
Need this written in C. Just C, not c+ or c++ just plain C
Spring 2017 CS 108-11 Dr. RJ. Mullick. Computing Fundamentals PROGRAMMING ASSIGNMENT #2 DUE Monday, Feb. 13, 2017 Using the flowchart for sum3numbers, write a c program to accomplish the task. You should use the unix environment to write the program. You then should compile and execute the program and submit the .c file on Blackboard. The flowchart is on Blackboard. Solution
// C code
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <time.h>
#include <assert.h>
#include <string.h>
#include <ctype.h>
#include <inttypes.h>
#include <stdbool.h>
#include <unistd.h>
int main()
{
double num1, num2, num3;
printf(\"Enter num1: \");
scanf(\"%lf\",&num1);
printf(\"Enter num2: \");
scanf(\"%lf\",&num2);
printf(\"Enter num3: \");
scanf(\"%lf\",&num3);
double total = num1 + num2 + num3;
double average = total/3;
printf(\"\ Total: %lf\ \",total);
printf(\"Average: %lf\ \",average);
return 0;
}
/*
output;
Enter num1: 34
Enter num2: 32
Enter num3: 34.5
Total: 100.500000
Average: 33.500000
*/
