Hoe to create an application for addition,subtraction,multiplication,division for children?😎😎 | Sololearn: Learn to code for FREE!
¡Nuevo curso! ¡Todo programador debería aprender IA Generativa!
Prueba una lección gratuita
- 1

Hoe to create an application for addition,subtraction,multiplication,division for children?😎😎

for practising in creating softwares using multiple programmes given above

9th Apr 2018, 4:42 AM
Rohit Magar
Rohit Magar - avatar
8 Respuestas
+ 5
#include <iostream> int main() { std::cout << R"(What do you want to do? 1: addition 2: subtraction 3: multiplication 4: division >>> )"; long long choice; std::cin >> choice; std::cout << R"(Enter the 2 operands separated by whitespace. >>> )"; double a, b; std::cin >> a >> b; std::cout << "Result: "; switch (choice) { case 1: std::cout << a + b; break; case 2: std::cout << a - b; break; case 3: std::cout << a * b; break; case 4: std::cout << a / b; break; default: std::cerr << "invalid choice"; } std::cout << R"( >>> )"; }
9th Apr 2018, 7:01 AM
Timon Paßlick
+ 2
Jan Markus What's a paper?
9th Apr 2018, 6:56 AM
Alex
Alex - avatar
+ 2
Interesting. What does it taste like?
9th Apr 2018, 7:28 AM
Alex
Alex - avatar
0
Here is s simple one in Python: print(eval(input())) Run the script and enter your calculation - eg. '5**2+17'
9th Apr 2018, 7:57 AM
Sebastian Keßler
Sebastian Keßler - avatar
0
thanks for best replies😎😎😎😎
11th Apr 2018, 5:37 PM
Rohit Magar
Rohit Magar - avatar
0
Jan Markus 😂 😂😂 you are too sarcastic
24th May 2018, 5:58 AM
scientist
scientist - avatar
0
Rohit Magar there is no kid or adult in coding I think, if starting to code, all have to go the same course. You can create functions for each one of them: func add(x,y) func div(x,y) etc.... for two input values but the best way is to use operators which are +-*/ .
24th May 2018, 6:01 AM
scientist
scientist - avatar