1public class Main
2{
3public static void main(String[] args)
4{
5int num = 100;
6boolean flag = false;
7for (int i = 2; i <= num / 2; ++i)
8{
9if (num % i == 0) {
10flag = true;
11break;
12}
13}
14if (!flag)
15System.out.println(num + " is a prime number");
16else
17System.out.println(num + " is not a prime number");
18}
19}
1#include <stdio.h>void main(){int value, rem;printf("Enter an int ");scanf("%d", &value);rem = value % 2;if (rem == 0)printf("%d is an even int\n", value);elseprintf("%d is an odd int\n", value);}