C++ program to print the addition of numbers using default constructor
kw.cpp
Output
kodingwindow@kw:~$ g++ kw.cpp
kodingwindow@kw:~$ ./a.out The addition of 10+10=20 kodingwindow@kw:~$
C++ program to print the addition of numbers using parameterized constructor
kw.cpp
Output
kodingwindow@kw:~$ g++ kw.cpp
kodingwindow@kw:~$ ./a.out The addition of 10+10=20 The addition of 10+10.0235=20.0235 kodingwindow@kw:~$
What Next?
C++ Functions
Advertisement