Write a program to accept a positive number, check whether it is a prime number or not.
Plzz guys tell me the answer... It's really urgent... I am promising u that I will make you brainliest...
Answers
Answered by
1
Answer:
Program to Check Prime Number
Enter a positive integer: 29 29 is a prime number. In the program, a for loop is iterated from i = 2 to i < n/2 . If n is perfectly divisible by i , n is not a prime number. In this case, flag is set to 1, and the loop is terminated using the break statement.
Explanation:
make me brainliest plzzzxx
Answered by
1
Answer:
please mark as a brainleast
Attachments:
Similar questions
Science,
3 months ago
Computer Science,
3 months ago
Social Sciences,
6 months ago
History,
6 months ago
Math,
10 months ago