#include <stdio.h> #include <limits.h> int main() { /////////////////////////////////////////////////// first part int count = 10 ; int sum = 0 ; int response ; while ( count != 0 ){ printf( "Enter a positive integer "); scanf( "%d" , &response); sum = sum + response ; printf("\n"); count--; } printf("The sum of the Entered numbers is : %d " , sum ) ; ////////////////////////////////// part 2 printf("\nPART - 2 : \n"); count = 7 ; double sum2 = 0 ; double average = 0 ; while ( count != 0 ){ printf( "Enter an integer(positive or negative "); scanf( "%d" , &response); sum2 = sum2 + (double)response ; printf("\n"); count--; } average = sum2/7 ; printf("The average of the Entered numbers is : %f \n\n" , average ) ; /////////////////////////////////part3 printf("\nPART - 3 : \n"); count = 0 ; int largest = INT_MIN; printf("Enter the number of elements to process : "); scanf("%d" ,&count ); while( count != 0 ){ printf(" Enter the element : "); scanf("%d" ,&response); if( response > largest ) largest =response; count--; } printf("The largest number entered is : %d " , largest ); return 0; }
in C The preceding LML program reads two numbers from the keyboard and determines and prints the larger value. Note the use of the instruction +4107 as a conditional trans- fer of control, much...
Write a program “hw4.c” that reads integer (less than or equal 100) from the keyboard and, on the output, writes the sum of the divisors of n (other than itself). For integers less than or equal to 1 it should print 0. For example, the input -3 0 1 4 5 6 12 should generate the output 0 0 0 3 1 6 16 Explanation of output: The input -3 is less than 1, output is 0. The input 0...