1 /* 2 * File: correct3.c 3 * -------------- 4 * When things go wrong. 5 * This program corrects the error in wrong3.c 6 */ 7 8 #include 9 #include "genlib.h" 10 #include "simpio.h" 11 12 main() 13 { 14 int n1, n2, 15 16 total ; 17 18 printf("This program adds two numbers.\n"); 19 printf("1st number? "); 20 n1 = GetInteger() ; 21 printf("2nd number? "); 22 n2 = GetInteger(); 23 total = n1 + n2; 24 printf("The total is %d.\n", total); 25 } _______________________________________________________ lassie% cc201 correct3.c lassie% lassie% a.out This program adds two numbers. 1st number? 1 2nd number? 1 The total is 2. lassie%