Draw a flowchart for this problem:
Ask the user to enter two integers: int1 and int2. The program uses the exponential operator to calculate and then print the result when int1 is raised to the int2 power. You also want to calculate the result when int1 is raised to the .5 power; however, you realize that it is not possible to take the square root of a negative number. If the value for int1 that is entered is a negative number, print a message to the user explaining why you cannot complete the task. Otherwise, calculate the square root and print it. Finish the program by printing the values of int1 and int2.
FlowChart:
Output:
1.calculating power
2.calculating square root
3.Try to calculate square root of a negative number.
If you have any queries, please comment below.
Please upvote , if you like this answer.
Get Answers For Free
Most questions answered within 1 hours.