Новый курс! Каждый программист должен знать генеративный ИИ!
Попробуйте бесплатный урокОбсуждения
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 голосов
11 ответовhow do I get line breaks?
name = input("What is your name?:")
print("Hiya, " + name)
age = int(input("Tell me your age:"))
year = str((2016 - age) + 100)
num = int(input("Enter a number between 1 and 50:"))
line = str((name + " will be 100 in the year " + year) * num)
print(\n line)
2 голосов
3 ответовАктуальное сегодня
3 consecutive words
1 Votes
c++ help
1 Votes
How to insert a link into code
0 Votes
My future
0 Votes
Code optimization | C++
0 Votes
C++ students' scores program
0 Votes
How to complete
2 Votes
Deploy Website
0 Votes