Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Ive put together the number6 one but if a different way from how my teacher advised me. As for number 7 Im not sure what

Ive put together the number6 one but if a different way from how my teacher advised me. As for number 7 Im not sure what to do, I keep getting a crashed code. Some help would be much appreciated.
image text in transcribed
Q6. (10 points) Average Write a code in C to calculate the average (AVG) of the integers entered by a user. ask the user to enter the values. to show the end of data entry use -1. Print the average like the following example: (suppose the user has entered 2, 3, 4) The average value is 3.00, Use the following formula for calculating average of n integers x1, x2.,..Xn AVG (x1+ x2+...Xn) The default is the user enters just positive integer numbers. (-1 is sentinel value.) Q7. (15 points) Perfect square In mathematics, a square number, sometimes also called a perfect square, is an integer that is the square of an integer; in other words, it is the product of some integer with itself. For example, 9 is a square number, since it can be written as 3x3. (Text from Wikipedia) Write a program to check if the input number (less than 1000) is the summation of two perfect square or not. For example 25 is 16+9 that both numbers 16 and 9 are perfect square. The output should be such as the following examples: If input is 3 the message should be: 3isnota summation oftwoperfect square. 25 is the summation of two perfect square, because If input is 25: the message should be: 25-SQ (3) +SQ (4

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Fundamentals Of Database Systems

Authors: Ramez Elmasri, Sham Navathe

4th Edition

0321122267, 978-0321122261

Students also viewed these Databases questions