Question
Exercise #1: Using Geany, write a C program that asks the user for four (4) integer numbers and put those into 4 integer variables. Always
Exercise #1: Using Geany, write a C program that asks the user for four (4) integer numbers and put those into 4 integer variables. Always use a prompt to help guide the user. You can ask for all 4 numbers at once (like 'Enter 4 numbers:') or one by one. Next, have your program produce and output the sum of those four numbers. Be sure the output has a label which tells the user what the output value represents. (eg: Sum of the four values is: 23). Next have your program output the sum of the first two numbers minus the sum of the last two. Next have your program produce and output the sum of the squares of the four numbers. Next have your program produce and output the exact quotient (a real number with a decimal point - a double) of the square root of the sum of the squares of the numbers, divided by the sum of all the numbers. eg for input values 3 4 5 6 this is 0.51 [square root of (9+16+25+36) divided by 18]. Show the output with two decimal digits of accuracy. Are you sure you got your answer right? Try with a calculator and compare with your C program.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started