Q&A Discussions
i want to print sum of all integers from 1to 100 like for example :
1
3
6
10
15......
i tried it i know my code is wrong please help me class Program {
public static void main(String[] args) {
for(int x = 1; x <101; x++) {
int sum = int x;
System.out.println("1");
System.out.println("sum");
}
}
}
3 Votes
11 AnswersWhat the difference between :
-2 Votes
3 AnswersHow can I read from a file this line
19 34 Gateway Arch - St. Louis, MO.
The first digit is age, second timeUsed, and the rest description. So I want to read them and store them in a variable.
The code insime my while loop of my File is int age = reader.nextInt();
Int Tused = reader.nextInt();
Description = reader.next()
0 Votes
4 Answersjavascript
-2 Votes
7 AnswersHot today
X velocity
2 Votes
Files not linking in C++
0 Votes
And... Who is the staff then?
3 Votes
I am a super beginner
0 Votes
Web Dev
1 Votes
Pls give me an idea
1 Votes
Why Pro?
1 Votes