+ 2

Write a Program in C++ to add any two numbers and display there sum, without using main() function directly.....

19th Dec 2017, 9:21 AM
Abhishek A. Deshmukh
Abhishek A. Deshmukh - avatar
6 Réponses
+ 1
the program should not contain main directly..... without writing main() directly.........
19th Dec 2017, 5:57 PM
Abhishek A. Deshmukh
Abhishek A. Deshmukh - avatar
+ 1
HINT.... u can use any place value instead of main.........
19th Dec 2017, 5:58 PM
Abhishek A. Deshmukh
Abhishek A. Deshmukh - avatar
20th Dec 2017, 4:46 PM
Abhishek A. Deshmukh
Abhishek A. Deshmukh - avatar
0
the above code will not display the sum .....
19th Dec 2017, 2:39 PM
Abhishek A. Deshmukh
Abhishek A. Deshmukh - avatar
19th Dec 2017, 5:54 PM
Dave
Dave - avatar
0
#include <iostream> using namespace std; void sum(){ int a = 4; int b = 3; cout << a + b << endl; }; void notMain(){ sum(); }; int main(){ notMain(); return 0; };
20th Dec 2017, 9:47 AM
Vitto Denson
Vitto Denson - avatar