- 1

Write a programmer in c++ to Calculate the difference 10 and 12

Difference

24th Jul 2017, 2:46 PM
Punam Dangaich
Punam Dangaich - avatar
5 Answers
+ 4
How to write programmer 😐? cout << 12 << "-" << 10 << "=" << 2; Maybe...LoL
24th Jul 2017, 2:59 PM
Yanothai Chaitawat
Yanothai Chaitawat - avatar
+ 4
cout << 12-10;
24th Jul 2017, 4:14 PM
‎ ‏‏‎Anonymous Guy
+ 3
difference of two succesive numbers is always 2 |n - (n+2)| = |n-n-2| = | -2| = 2 or |n - (n-2)| = |n-n+2| = |2| = 2 So the algorithm should look like this: give user input(number) print(number+" - "+(number+2)+" = "+(number- (number+2)))
24th Jul 2017, 3:06 PM
Haris
Haris - avatar
+ 1
return 2; There, solved it :D However, that "write a PROGRAMMER" task might be a lot more difficult.. :) Joking aside, you shouldn't come here and expect other people to do your homework... Write some code, post it here, and ask questions when you are stumped.
24th Jul 2017, 3:01 PM
Bogdan Sass
Bogdan Sass - avatar
0
Difference two number
24th Jul 2017, 2:47 PM
Punam Dangaich
Punam Dangaich - avatar