ok i just started loops in my java class and im stuck on getting this loop working i dunno what all math to do to get these numbers for the output
97, 84, 72, 61, 51, ... 1
ThUgLoRd
0
Newbie Poster
Recommended Answers
Jump to Posttry this...
int diff=14
for(int lp=97;lp>0;lp-=diff)
{
System.out.println(lp);
diff--;
}try that, think it should work
Jump to PostThe solution that you were given does not seem to work if I use it, so I decided to use another method using a while loop and the instructions are as follows
int i = 97;
int j = 14;while(j > 0)
{
System.out.println(+ i);
j--;
i …
All 6 Replies
cms271828
2
Junior Poster
Goitse
2
Newbie Poster
TylerSBreton
13
Junior Poster in Training
cms271828
2
Junior Poster
bommavj
0
Newbie Poster
bommavj
0
Newbie Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.