Solve Program

Solve Program

View Answers

September 29, 2008 at 10:12 AM


hi

use this code

package rajanikant.code.sep_2008;

public class EvenOdd {

public static void main(String s[]){

for(int i = 1; i<=100; i=i+2){
System.out.print(i + " ");
}
}
}


Rajanikant

September 29, 2008 at 3:26 PM

Hi,


import java.io.*;

public class OddEvenTest{
public static void main(String[] args){
try{
for(int i = 1; i<=100; i=i+2){
System.out.println(" " + i);
}

System.out.println("Given number is Odd.");

}
catch(NumberFormatException e){
System.out.println(e.getMessage() + " is not a numeric value.");
System.exit(0);
}
}
}

------------------------------------------------------------------------


Visit for more information.

http://www.roseindia.net/java/

Thanks.









Related Tutorials/Questions & Answers:
A Program To Solve In Java
A Program To Solve In Java  x!/x+(x+2)!/x+(x+4)!/x ... (x+n)!/x
please solve this program
please solve this program  Build a package EMPPACK that contains one stored function Validatesal() and two stored procedures Insertemp() and Getempdetails().The Insert_emp() procedure inserts a particular employee
Advertisements
Solve Program - Java Beginners
Solve Program  Write a progaram in java to display all odd number from 1 to 100   hi use this code package rajanikant.code.sep_2008; public class EvenOdd { public static void main(String s
write a java program to solve the infix expression
write a java program to solve the infix expression  ==>> solve the below expression using java program: 2+5*2-5+6/2 using stack operations or any other process in java
plz solve this program - Java Interview Questions
plz solve this program  write a program to out put this resault using two dimensional array this is an image of the reasult: http://www.4shared.com/file/154846107/dc2f1ac1/_2__Untitled-1.html so help me
Solve Program - Design concepts & design patterns
Solve Program  54321 4321 321 21 1  use this block of code in your program for(int i =5 ; i>=1 ; i--){ for(int j=i; j>=1; j--){ System.out.print(j); } System.out.println
Solve it
Solve it  How to calculate the value which contains oparator and operand both using command line argument
solve this
solve this   Create a student class. The student object should have studentid, studentname, subject and marks as properties. Also generate the getter and setter methods. Create 5 objects of this class and populate values
solve this pbm
solve this pbm  sir rows are also inserting i have checked in the database also the rows are not affected in the table . The first pbm wich i have... can execute the program
solve this pbm
solve this pbm  its not working the code for databae access using servlets
ModuleNotFoundError: No module named 'solve'
ModuleNotFoundError: No module named 'solve'  Hi, My Python program is throwing following error: ModuleNotFoundError: No module named 'solve' How to remove the ModuleNotFoundError: No module named 'solve'
how to solve
how to solve   log4j:WARN No appenders could be found for logger (org.apache.struts.util.PropertyMessageResources). log4j:WARN Please initialize the log4j system properly
Solve
solve this problem
solve this problem  I typed this program and compiled.The program is compiled but when i eneterd url in tomcat server. Its not giving error but only...){ System.out.println(e); } } } XML File for this program <
how to solve this..
how to solve this..  Given a list of students and their marks Name | Science | Math | English | Computer Ahmad | 28 | 100 | 66 | 34 Samad | 56 | 89 | 55
how to solve this..
how to solve this..  Given a list of students and their marks Name | Science | Math | English | Computer Ahmad | 28 | 100 | 66 | 34 Samad | 56 | 89 | 55
help me to solve this question
help me to solve this question  Write a program that inputs a series of integers into an array. The numbers are in the range 0 to 100. Calculate and display : a) The Largest number b) The Smallest Number c)The sum of the numbers
ModuleNotFoundError: No module named 'flood-solve'
ModuleNotFoundError: No module named 'flood-solve'  Hi, My Python program is throwing following error: ModuleNotFoundError: No module named 'flood-solve' How to remove the ModuleNotFoundError: No module named '
ModuleNotFoundError: No module named 'magiceye_solve'
ModuleNotFoundError: No module named 'magiceye_solve'  Hi, My Python program is throwing following error: ModuleNotFoundError: No module named 'magiceye_solve' How to remove the ModuleNotFoundError: No module named
ModuleNotFoundError: No module named 'solve-instrument'
ModuleNotFoundError: No module named 'solve-instrument'  Hi, My Python program is throwing following error: ModuleNotFoundError: No module named 'solve-instrument' How to remove the ModuleNotFoundError: No module
ModuleNotFoundError: No module named 'sudoku-solve'
ModuleNotFoundError: No module named 'sudoku-solve'  Hi, My Python program is throwing following error: ModuleNotFoundError: No module named 'sudoku-solve' How to remove the ModuleNotFoundError: No module named '
ModuleNotFoundError: No module named 'sudoku-solve'
ModuleNotFoundError: No module named 'sudoku-solve'  Hi, My Python program is throwing following error: ModuleNotFoundError: No module named 'sudoku-solve' How to remove the ModuleNotFoundError: No module named '
ModuleNotFoundError: No module named 'flood-solve'
ModuleNotFoundError: No module named 'flood-solve'  Hi, My Python program is throwing following error: ModuleNotFoundError: No module named 'flood-solve' How to remove the ModuleNotFoundError: No module named '
program
program  any program of hotel or school management
program
program  program of jdbc using ms access for creating table
program
program  write a javascript program to create a application form with validation
program
program  write a html program in show table and this word in box
program
program  write a program different between to dates in terms of days in java
program
program  WAP a java program to form 1/2+3/4+5/6+7/8 series
program
program   Write a program to find the difference between sum of the squares and the square of the sums of n numbers
program
program  write a program reversee a string. input-hi this is roseindia output-roseindia is this hi
program
program  develop a servlet to insert the data in the database from our program in the table stored in the database
please solve the programme
please solve the programme  Develop a java program to find the roots of a quadratic equation ax2+bx+c=0, with the following specification :- Class name :- Quad Data members float a,b,c,d, with a,b,c are the co-efficient
program
program   An old-style movie theater has a simple profit program. Each customer pays $5 per ticket. Every performance costs the theater $20, plus $.50 per attendee. Develop the program calculateTotalProfit that consumes
program
program  write a java program to input a no. and print wheather the no. is a special no or not. (special no. are those no whose factorial of the sum of digit of the no is same as the original
program
program  Develop the program calculateCylinderArea, which accepts radius of the cylinder's base disk and its height and computes surface area of the cylinder
program
program  explanation of program on extending thread class   Hi Friend, Please go through the following link:ADS_TO_REPLACE_1 Java Threads Thanks
program
program  Develop a program that computes the distance a boat travels across a river, given the width of the river, the boat's speed perpendicular to the river, and the river's speed. Speed is distance/time, and the Pythagorean
program
program  how to improve programming skills plss tell some tips..i am understanding concepts but unable to write program so,pls give some guideness plsss
Program
Program  a program to prove that default constructor of super class is available to subclass by default. Define a parameterize constructor for super class to store name = â??Tommyâ?? age=â??23â?? and call this constructor
Program
Program  a program to create two classes Commercial and Domestic. Override the method calculatebill() of Commercial class(Rs.8 per unit) into Domestic class(Rs 6 per unit) to compute electricity bill for both classes
program
program  no i want a program that shows how merge sort algorithm works in graphical representations like numbers are taken in circles and computation... in rectangles or circles wat ever it may be. the theme of program is to show algorithm
program
program  . Develop a program that accepts an initial amount of money (called the principal), a simple annual interest rate, and a number of months will compute the balance at the end of that time. Assume that no additional
program
program  Write a JSP Program, which displays a web page containing the name of the Courses, Courses being offered currently, number of students enrolled in each course, new courses to be offered, eligibility criteria for taking
program
program  i want a progra in java to print a sentence in alphabetic order, taking the input from the user.the program should writen without using the array for example : if input= this is a cat then output sould = a cat
program
program  Utopias tax accountants always use programs that compute income taxes even though the tax rate is a solid, never-changing 15%. Define the program calculateTax which determines the tax on the gross pay. Define
program
program  Write a JSP Program, which displays a web page containing two web links one for your profiling and other for the schedule of theory of practical classes of your Batch. When one click on link for getting your profile
program
program  Write a program to print details of a week for a particular day using array of objects Integer and String. OUTPUT: First Day of Week is Monday Second Day of Week is Tuesday Third Day of Week is Wednesday Forth Day
help me to solve this question...
help me to solve this question...  Given below is a class definition for Book. Type and compile the class, and answer the following questions... price; } } Write a program in a class TestBook that can do the following: Read
help me to solve this problem..
help me to solve this problem..  Given below is a class definition for Book. Type and compile the class, and answer the following questions: class...; } } Write a program in a class TestBook that can do the following: Read

Ads