Question
write a program that uses switch case . The program first asks the user to type an integer value greater than 0. Then the program
write a program that uses switch case . The program first asks the user to type an integer value greater than 0. Then the program asks the user to select one operator from + , * , or - If the user types '+', the program should print the sum of all numbers from 1 upto the value typed by the user If user types '*', the program should print the times table of that number if the user types '-', the program should calculate the mean squared difference of this number with all numbers that are greater than zero and less than this number; Formula for mean squared difference (say the number is n) : ( (n-1)*(n-1) + (n-2)*(n-2) + (n-3)*(n-3) +...1)/(n-1)
(JAVA)
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started