#include void main(void) { /* The simple program that finds the sum of all numbers read up to a negative number using simple do_while structure */ float num, sum; /* initialize the control variable and ohters */ sum = 0; printf("please type the first number \t:"); scanf("%f", &num); /* test for loop continuation using control variable */ do { sum += num; /* Now update the control variable */ printf("please type the next number \t:"); scanf("%f", &num); } while (num >= 0); printf("sum = %0.2f \n", sum); }