Monday, September 16, 2013

Java Program 010

Write a program DisplayPattern2.java, which accepts a number as argument and print the following output:

Ex. Input : 5

Output:
1
1 2
1 2 3
1 2 3 4
1 2 3 4 5

Wednesday, September 11, 2013

Java Program 009

Create a file ArithmeticTest.java which accepts three arguments- two int values and one Operator (any one of +, –, *) and Print The Following Output:

Output: 2 + 3 = 5

Java Program 008

Write a program TestDemo.java which accepts the number as argument and print ” You Have Entered Zero ” if the Value is equal to 0. It should print “You have entered Positive value ” if the value is greater than 0. It should print “You have entered negative value ” if the Value is less than Zero.

Java Program 007

Write java Code For printing Smallest of two given floating point numbers.

Java Program 006

Write a Java Program to print This Pattern.

1
2 4
3 6 9
4 8 12 16
5 10 15 20 25

Friday, August 16, 2013

Java Program 005

Write a program DisplayPattern1.java, which accepts int value as arguments and print the Following Output:
Ex: Input: 12
Output: 
1   2   3   4
5   6   7   8
9  10  11 12

Java Program 004

write a Program DisplayNumbersDemo1.java, which accepts Three int values as command line arguments (Start value End value and Increment value) and print the number between the given Numbers.

Ex:    Input: 10, 30, 2

Output: 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30

Friday, August 9, 2013

Java Program 003

Write a program to print sum of all even numbers between given numbers.

Java Program 002

Write a program DisplayNumbers.java, which accepts two int values as command line arguments (Start value and End value) and print the numbers between the given Numbers.

Java Program 001

Write solution for java code for counting the number of numbers, reading one at a time. If the given no is negative, count can be stopped and program exit.