24.12.19

Example of (if else) program in c

#include<stdio.h>

void main()
{

int n;

printf("Enter a number:");
scanf("%d",&n);

if(n%2==0)

printf("Even");

else

printf("Odd");

}

No comments:

Post a Comment

JAVA program pattern 2

import java.util.Scanner; public class pattern3 { public static void main(String args[]) { int i,j; Scanner sc=new Scanner(System.in); Syste...