Use app×
Join Bloom Tuition
One on One Online Tuition
JEE MAIN 2025 Foundation Course
NEET 2025 Foundation Course
CLASS 12 FOUNDATION COURSE
CLASS 10 FOUNDATION COURSE
CLASS 9 FOUNDATION COURSE
CLASS 8 FOUNDATION COURSE
0 votes
79.3k views
in Computer by (48.9k points)
closed by

Write a menu driven program to accept a number and check and display whether it is a prime number or not OR an automorphic number or not. (Use switch- case statement)

(a) Prime number: a number is said to be a prime number if it is divisible only by 1 and itself and not by any other number. 

Example : 3, 5, 7, 11, 13 etc., 

(b) Automorphic number: An automorphic number is the number which is contained in the last digit(s) of its square. 

Example 25 is an automorphic number as its square is 625 and 25 is present as the last two digits.

1 Answer

+1 vote
by (49.9k points)
selected by
 
Best answer

import java.io.*;

Welcome to Sarthaks eConnect: A unique platform where students can interact with teachers/experts/students to get solutions to their queries. Students (upto class 10+2) preparing for All Government Exams, CBSE Board Exam, ICSE Board Exam, State Board Exam, JEE (Mains+Advance) and NEET can ask questions from any subject and get quick answers by subject teachers/ experts/mentors/students.

Categories

...