Question: C programming only please It wont help to use loop It doesnt need have to be very professional, it can be basic. Write a program
Write a program that will read in 4 numbers of datatype double from the user and store into 4 separate variables. The program should test each number to see if it is a perfect square (which means that the squareroot of that number is a whole number) The program should have a pointer to an double that, at the end, will point to the largest perfect square of the 4 entered into the program. The program should only point to a variable, if that variable is 1) a perfect square and 2) if the number that the pointer is pointing to is smaller than the current number (or if the pointer is pointing at nothing) The program should print out the largest perfect square to the screen. HINT # 1: if a pointer hasn't had anything assigned to it yet, then it's empty. So a pointer(let's call it pnum), is empty if: pnumNULL HINT #2: you'll need to use the floor() library function. The floor function just cuts off the decimal portion of a double eaving the integer piece. floor(5.603) will be equal to 5. So if num is a perfect square, then: sqrt(num)-floorfsqrt(num)) HINT #3: this program will NOT use any loops at all. Later, once we cover arrays, we could do this in a loop or two, but with what we know, you just have to read in each number into a separate variable. Test your program with the following: 16 27 369
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
