Answers

The Brainliest Answer!
2016-01-10T15:22:38+05:30
I used java ===> i have NOT  studied CPP 
====> in java <====

............................
import java.util.*;
{
public static void main(String arg[])
{
Scanner sc = new Scanner (System.in);
int n,i,c=0;
System.out.println("Enter a Number");
n=sc.nextInt();
for(i=1;i<=n;i++)
{
n=n%i;
c=c+1;
System.out.println("NOT!");
}}
For eg;if the number given is 2
Output:
Prime Number
if the number given is 8
Output:
NOT!
......................................
2 5 2
2016-01-13T17:06:53+05:30
n=sc.nextInt();
for(i=1;i<=n;i++)
{
n=n%i;
c=c+1;
System.out.println("NOT!");
}}
For eg;if the number given is 2
Output:
Prime Number
if the number given is 8
Output:
NOT!
0