Can I improve this code to make it shorter and more easy? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 2

Can I improve this code to make it shorter and more easy?

I created a code using cpp (c++) for maths of 2 nubmers... https://code.sololearn.com/cuBJxgXA0KTM/?ref=app

1st May 2018, 7:10 PM
Swogyan Bhattarai
Swogyan Bhattarai - avatar
2 Answers
+ 1
Remove the sum, sub, multiply ect varables and do the calculations at the cout e.g. for sum cout << "Sum = " << a + b << "\n"; instead of making a ‘sum’ variable I done it for you if you just want to use that: https://code.sololearn.com/cJbyIMBw49nj/?ref=app
1st May 2018, 8:25 PM
TurtleShell
TurtleShell - avatar
0
https://code.sololearn.com/c8h486GoOrWF/?ref=app
1st May 2018, 8:29 PM
Petya soname
Petya soname - avatar