User Profile
Collapse
-
not quite but the declaring part i do.. the 2nd part not so clear.. coz i din learn anything bout arrays yet -
how do u make them into arrays.. coz i am using switch statements.. can u giv an example?...Leave a comment:
-
in the switch statement rite?
i put
Code:switch(month){ case1: case3; case5; numdays=31; break; default: System.out.println("Invalid month."); break; } System.out.println("The Number of Days in " +month+"," +year+ " is "+numDays);
Leave a comment:
-
ERm ..i get the idea d.. but the thing is i don't know much from switch.. i learned not much..can try and put an example..so i can learn? .sorry to bother u so much ><...Leave a comment:
-
So ..the better solution is by using the switch??
but nomad suggested I would make a array or an array list which would hold your months and days and then use an if statement using a scanner for the inputLeave a comment:
-
using the switch... i see .. but i dono how to merge them all .. from the 1st example i posted ..using the switch and the 2nd using the arrays.. how to merge them ......Leave a comment:
-
algorithm... i dono bout that but i only got an idea... but i dono how to use java to implement it..
Prompt user to input month,
Prompt user to input Year,
use the scanner to read the inputs.
direct them to years,
using the if statement (year/4) leap
then to months,
then to days ,
if (leap year) feb would be 29
using arrays.
print...Leave a comment:
-
Tried d.. but it does come out then u type the year and month it comes out but i dono how to continue from this part d..i need help in the arrays.. i din learn arrays yet .. i tried to learn thru google but it is not quite clear.. can assist abit? plz? ??...Leave a comment:
-
lolx... i think i'm stupid.. i couldn't understand anything.. haiz..
i tried this ..but i dono how to continue d..can help?
Code:import java.util.*; import java.lang.String; public class Switch { public static void main(String args[]) { int theYear; int theMonth; int theDays;
Leave a comment:
-
GregorianCalend er is quite hard to understand now.. but i will later.. for now..i hope that someone can make a sample for me..using arrays and if statment.. i tried buy failed.. quite hard.. pls teach..Leave a comment:
-
-
Thx dude.. it works.. btw i can't seem to have a start at this ..seems confusing..
Sample output:
Sample output2:
Sample output3:
I kinda made a mess again.. =\...Leave a comment:
-
CAn anyone help me wit the?? scanner stdin?
This is the question?.. can anyone help me?? kinda confused..using JcreatorLe
SAmple Output :
I kinda messed up alot..
here is my codes..... -
can ya post a sample of anything..
coz i am new to java... ><
thx in advancedLeave a comment:
-
Can anyone help me wit this?
Question 1
The mail-order company requires a program to calculate discounts that it is giving to all its customers during a sales campaign. Write a program that asks the user to enter the total price of an order. If the order price is RM200.00 or less, the discount rate is 10%. If the order price is greater than RM200.00, the discount rate is 15%.The net price of the order is the price minus the discount. The program should display...
No activity results to display
Show More
Leave a comment: