0
Please help me solve this sololearn question
Write a program to take two integers as input and output their sum. Sample input: 2 8 Sample output: 10
18 Answers
+ 3
Hints:
declare 2 int variable
take input from user
output int1+int2
+ 3
That was the most easiest question . If you can't do this you better to learn your lesson again.Don't ask for answer.Tips:Check the comments of the lesson.This will help you to understand the concept better.Also use google if you don't get it.
+ 2
Revise the lessons again
+ 1
Post your attempt then
+ 1
Take user input
like this :- x=int(input())
For 2 variables and add them
+ 1
Yes
+ 1
#include <bits/stdc++.h>
Using namespace std;
int main(){
int a,b;
cin >> a >>b;
cout << "Sum is:" << a+b << endl;
// c=a+b;
//cout << c<<endl;
Return 0;
}
+ 1
In python
X = 2
Y = 8
Print(X + Y)
That's it....just be sure that your casing is on point
+ 1
No I wasn't
+ 1
No
0
I revised the lessons
Still don't know how to solve it.
Something is missing.
0
x=2
y=8
result=(int(input())
2+8
Here it shows error
0
I just wanted someone to give me the solution to thank him :(
0
The brackets after input
What should I put in them?
0
Hello!
Thank you I solved it.
0
No need to improve anything, you are just having a problem with understanding things, even your answer that you got on youtube is kinda unclear:
Num1 = int(input())
Num2 = int(input())
Print(Num1 * Num2)
Or you can use eval
0
No friend , they need to improve their lessons.
- 2
I finally solved it.
The solution was
print(int(input())+int(input()))
I found the answer on youtube
The lessons didn't learn me this
I knew there is something missing
I was never able to solve it alone.
That is why I wanted help
Sololearn should improve their learning lessons.