Write a C program which prompts the user with the following options at the command prompt: 1) Compare two numbers for the larger, 2) Test a number for prime or not. After choosing the option program will ask user to enter any two integers and perform the operation as given in the options.
Write a C program which prompts the user with the following options at the command prompt: 1) Compare two numbers for the larger, 2) Test a number for prime or not. After choosing the option program will ask user to enter any two integers and perform the operation as given in the options.
Share
Here's a C program that prompts the user with the given options and performs the corresponding actions after taking input from the user:
This program prompts the user with options to compare two numbers for the larger or test a number for being prime. After the user chooses an option, it asks the user to enter the required numbers and performs the corresponding operation.