Hey, I'm a student wanting help on how to write a program in netbeans.. I have no idea how to work this website so this question may be in the wrong place but.. here goes:
so i need to write a program that outputs a quote one letter at a time in a line.. like this:
h
e
l
l
o
!
h
o
w
a
r
e
y
o
u
?
got it??
okay thanks!!!
We don't write programs for people. That's not how the site works. You write the program and when you get stuck, post your code and a specific question, and we try to nudge you in the right direction.
So give it a shot and when/if you get stuck, post your attempt.
VernonDozier
Posting Expert
5,527 posts since Jan 2008
Reputation Points: 2,633
Solved Threads: 711
Investigate and learn about the following:
Loops, in particular loops that increment an integer variable
The String class, in particular the charAt method
Printing to System.out
Give it a try, and when you get stuck come back here.
JamesCherrill
Posting Genius
6,373 posts since Apr 2008
Reputation Points: 2,130
Solved Threads: 1,073
axelle,
if your problem is how to use NetBeans IDE take a look at the tutorials .
Gook luck,
freelancelote
Junior Poster in Training
89 posts since Aug 2008
Reputation Points: 34
Solved Threads: 2
//Create a string and initialize it to some string literal
for i = 0 to i less than the string.size ; i++)
//use string.charAt(i) to print + "\n";
firstPerson
Senior Poster
3,923 posts since Dec 2008
Reputation Points: 841
Solved Threads: 608
Good start. You're on the right track. Keep going.
JamesCherrill
Posting Genius
6,373 posts since Apr 2008
Reputation Points: 2,130
Solved Threads: 1,073
Heyy guyss i would REALLY Appreciate if you could please tell me how to do this.
I need to create a program which will take 5 dollar amounts from the user (keyboard) and output the total entered. The program should have output that looks like the following:
$5.34
$10.62
$0.25
$148.23
Total: $164.43
- make 5 variable, or arrays.
- Make a total variable. initialize it to 0;
- ask user to input 5 times
- make total += input1, total += input2 ...
[Example]
Scanner read = new Scanner(System.in);
float Total = 0.0f;
float input1 = 0;
float input2 = 0;
input1 = read.nextInt();
Total += input1;
input2 = read.nextInt();
Total += input2;
System.out.print("Total is = " + Total + "\n");
firstPerson
Senior Poster
3,923 posts since Dec 2008
Reputation Points: 841
Solved Threads: 608