answersLogoWhite

0


Best Answer

#include <stdio.h>

#include <math.h>

/* bear in mind that this has no idiot-proofing whatsoever. For example, it doesn't check to see if the numbers entered are positive (and sqrt doesn't handle imaginary numbers) */

int main(int argc, char *argv[]){

float val1, val2, root1, root2;

printf("Gimme a number: ");

scanf("%f", &val1);

printf("Gimme another number: ");

scanf("%f", &val2);

root1 = sqrt(val1);

root2 = sqrt(val2);

printf("The square root of %f is %f.\n", val1, root1);

printf("The square root of %f is %f.\n", val2, root2);

printf("The product of %f and %f is %f\n", root1, root2, root1 * root2);

return 0;

}

User Avatar

Wiki User

13y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: How do you create a program in C that ask the user for two numbers and then displays the square root of both numbers and then multiplies and displays the results of the two square roots?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

Examples of logical errors in c program?

Logical errors :- These errors occur because of logically incorrect instructions in the program. Let us assume that in a 1000 line program, if there should be an instruction, which multiplies two numbers and is wrongly written to perform addition. This logically incorrect instruction may produce wrong results. Detecting such errors are difficult.


What results after a cell has gone through mitosis and cytoplasmic division?

it multiplies


A gallery displays a list of?

potential results.


What displays field codes instead of field results?

Shift + F9 will toggle between field codes and results.


What basically is a shell?

A shell is a program that read commands from some input device, typically the keyboard, and displays results on some output device, typically the display. It manages the environment and executes other programs as needed.


cross-tab query?

performs calculations on the values in a field and displays the results in a datasheet


In Excel a worksheet that displays the formulas used to create the results is called what?

Formula wooksheet


What is a network computer that transmits data a user enters to a host for processing and displays the results?

Terminal


What is A peripheral device that displays prints or transmits the results of processing from the computer memory?

Input Device


What is an office feature that displays a list of potential results instead of just the command name?

Gallery


Is there a program that creates programs based on users desired results?

What is a center based program?


How does zaplook work?

It goes through the google search results and displays them on the page. Here is the link http://www.therealzaplook.tk