#8 | C++ | Input one number in a class and input another number in another class. Find summation between these numbers using a friend function.
![Image](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjc4szQ0pL4xxwxoao9jHK4zbn9koSgpb6bOw310tXLpOBgFkg4gWkuQdw1twjgWoqEfWaD-z7Phau97ppquwEIjSlRfbV5_Zbv0VExFUWjd9TbRjTVqtivUarkJMo8HorU4IOBn2ZGIvXRjw6pZrWv2WsawdMd2fVTaEGTIagNF_E9AMB83hLpAB6D2w/w261-h293/c-logo.png)
CompTech C++ Practical Assignment #practical 8 YouTube Video :- Question :- Input one number in a class and input another number in another class. Find summation between these numbers using a friend function. Code :- /* practical 5 Write a program to input one number in a class and input another number in another class. Find summation between these numbers using a friend function. */ #include <iostream> using namespace std; /* when we work with more than one class then we have to declare the class name first, so that, we will not face any type of error */ class xyz; // declaring second class "xyz" // defining class "abc" class abc { // Declare variable in private section to store one value int n1; // public :- declare two function // 1. Member function - getdata() - assign the value to variable // 2. Friend function - summation() - calculate the sum public: // Declaring and defining member function inside the clas