+ 2
Write a Program in C++ to add any two numbers and display there sum, without using main() function directly.....
6 Réponses
+ 1
the program should not contain main directly.....
without writing main() directly.........
+ 1
HINT....
u can use any place value instead of main.........
+ 1
See the Solution........
https://code.sololearn.com/c4A419Gw8Gaj/?ref=app
0
the above code will not display the sum .....
0
https://code.sololearn.com/cvxH0QSIPmPl/?ref=app. it works now.
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;
};