I am a very beginner in c++. i am just learning abc of this language.. i created this small program that would add:
#include
using namesp
Here is how we do :
#include
using namespace std;
float add(float a, float b){
return a+b;
}
int main(){
float num1;
float num2;
while(true)
{
cout<<"add...enter digits \n";
cout<<"first digit: ";
cin>>num1;
cout<<"\nSecond number: ";
cin>>num2;
cout<< "your sum is: "<> ch;
if (ch == 'Y' || ch == 'y')
continue;
else
break;
}
return 0;
}