How to code based below description? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

How to code based below description?

Harsh has candies to eat but they are in different 2 packets. Given the amount of candies in packet A -  and in packet B - . Return the total number of candies Harsh can eat. Example a=4 b=3 Return 7 . Input Format Only line contains two integers  a and b Constraints 0<=a, b<=1000 Output Format Return single integer, which is the required answer https://code.sololearn.com/cksvuMuHSeg8/?ref=app

28th Jun 2022, 1:58 PM
Vigneshwar
4 Answers
+ 3
It's working fine for me, but I will say you seem to have some styling issues. Typically comments go on the line before the code it applies to.
28th Jun 2022, 2:17 PM
Justice
Justice - avatar
+ 3
Just to add to Justice answer, if you want to comment at the same line of the code, place a whitespace first before typing the # symbol to separate the code and the comment. https://code.sololearn.com/cwI3xFl824pq/?ref=app
28th Jun 2022, 3:33 PM
noteve
noteve - avatar
+ 1
Do you have an attempt where you tried, even if it's just pseudocode?
28th Jun 2022, 1:59 PM
Justice
Justice - avatar
0
https://code.sololearn.com/cksvuMuHSeg8/?ref=app This code i tired but not works
28th Jun 2022, 2:14 PM
Vigneshwar