alman542004 Posted July 21, 2011 Share Posted July 21, 2011 dont know where to put my dowhile at and its not working import java.util.*; public class { public static void main(String[] args) { do{ int number; String again; Scanner keyboard = new Scanner (System.in); System.out.print("Enter one number to be calulated as odd or even --:> ");//prompting the user number = keyboard.nextInt(); evenLine(number); System.out.print("do u want ro run again"); again = keyboard.next().toUpperCase(); }while(again.equalsIgnoreCase("Y")); } public static void evenLine(int number) { if(number% 2 == 0) { System.out.println(number+" is even number"); } else { System.out.println( number+" is odd number"); } } Link to comment https://forums.phpfreaks.com/topic/242518-my-do-while/ Share on other sites More sharing options...
Porl123 Posted July 21, 2011 Share Posted July 21, 2011 This is the php section you know. ;o Link to comment https://forums.phpfreaks.com/topic/242518-my-do-while/#findComment-1245514 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.