Hi All,
I have one doubt regarding binary...
When I write a c++ program then I comiple it and once my binary is ready and then I run it and provide what console asks and then it displays prcoessed data....Thats it...to use this binary againI have to close this binary and run it again so that I can proceed to use it again....
This is what I do when I write my programs.....but when applications are running in organisation...a binary has to run continuously and do the needful.
Can you please help me here know how that happens?
#include<iostream>
int main()
{
int n, s;
char c = 'a';
while(true)
{
std::cout << "Enter an integer: ";
std::cin >> n;
s = n * n;
std::cout << "square of n is: " << n << "\n";
std::cout << "Do you wish to quit? y/n";
std::cin >> c;
if(c == 'y' || c == 'Y')
{
break;
}
}
return 0;
}