//simple java program
class Hi{
public static void main(String[]args)
{
System.out.println("Hello Friends");
System.out.println("Welcome to Krishnasinghprogramming blog");
}
}
see output below:
Hello Friends
Welcome to Krishnasinghprogramming blog
Find Even and Odd Number in Java Program
import java.util.Scanner;class Oddeven
{
public static void main(String[]args)
{
int a;
System.out.println("Pz enter the num ");
Scanner in=new Scanner(System.in); //scanner use for input the value in variable
a=in.nextInt();
if(a%2==0)
{
System.out.println("thz z even num");
}
else
{
System.out.println("thz z odd num");
}
}
}
See Output Below..
Pz enter the num
//suppose user enter 10 then given result is:
thz z even num
// suppose user enter 5 then given result is:
thz z odd num
The Software Developer Cycle Here How to Compile and Run Program
How to Create Table Print in C++ Program
Make Windows 7 Genuine Using Command Prompt in 60 Seconds
WAT REMOVER DIRECT DOWNLOAD LINK Make Windows 7 Genuine
No comments:
Post a Comment
Please Comment Your Valuable Feedback....