import java.util.Scanner; class EvenOdd { public static void main(String args[]) { int c; System.out.println("Input an integer"); Scanner in = new Scanner(System.in); c = in.nextInt(); if ( (c/2)*2 == c ) System.out.println("Even"); else System.out.println("Odd"); } }
Computercodes
Saturday, 3 May 2014
So here's the program of finding ODD AND EVEN numbers in JAVA !!
Friday, 2 May 2014
It's the vowel's program in JAVA Enjoy guyzz!!
package tables;
import java.util.Scanner;
public class Tables {
public static void main(String[] args) {
Scanner abcd=new Scanner(System.in);
System.out.println("Enter which table you want to print:");
int z= abcd.nextInt();
System.out.println("Enter how much time you want to print;");
int x= abcd.nextInt();
for (int i=0;i<=x; i++)
{
for (int j=0;j<z; j++){
System.out.println(z+"*"+j+" = "+(z*j));
}
}
}
}
package tables;
import java.util.Scanner;
public class Tables {
public static void main(String[] args) {
Scanner abcd=new Scanner(System.in);
System.out.println("Enter which table you want to print:");
int z= abcd.nextInt();
System.out.println("Enter how much time you want to print;");
int x= abcd.nextInt();
for (int i=0;i<=x; i++)
{
for (int j=0;j<z; j++){
System.out.println(z+"*"+j+" = "+(z*j));
}
}
}
}
So it's Java code for printing table's
package tables;
import java.util.Scanner;
public class Tables {
public static void main(String[] args) {
Scanner abcd=new Scanner(System.in);
System.out.println("Enter which table you want to print:");
int z= abcd.nextInt();
System.out.println("Enter how much time you want to print;");
int x= abcd.nextInt();
for (int i=0;i<=x; i++)
{
for (int j=0;j<z; j++){
System.out.println(z+"*"+j+" = "+(z*j));
}
}
}
}
package tables;
import java.util.Scanner;
public class Tables {
public static void main(String[] args) {
Scanner abcd=new Scanner(System.in);
System.out.println("Enter which table you want to print:");
int z= abcd.nextInt();
System.out.println("Enter how much time you want to print;");
int x= abcd.nextInt();
for (int i=0;i<=x; i++)
{
for (int j=0;j<z; j++){
System.out.println(z+"*"+j+" = "+(z*j));
}
}
}
}
Subscribe to:
Posts (Atom)