Mastery19

++

here is my code!

<iostream>

using namespace std;

 

int main(){

int a;

int a2=0;

int b;

int c;

int d;

do{

   cout <<“give me a number”;

   cin >> (a);

   cout <<“give me another number”;

   cin >> (b);

   a2 = (a2+1);

   c= (a+b);

   cout << “the sum of the numbers is” <<c<<endl;

   cout <<“would you like to enter other values? 1)yes, 2)no”;

   cin >> (d);

 

 

 }

 while (d ==1);

 cout << “you did the operation “<<a2<< ” times”;

 return 0;

}

 

CC BY 4.0 Mastery19 by carlos green is licensed under a Creative Commons Attribution 4.0 International License.

Comments are closed.

Mastery19

++

here is my code!

<iostream>

using namespace std;

 

int main(){

int a;

int a2=0;

int b;

int c;

int d;

do{

   cout <<“give me a number”;

   cin >> (a);

   cout <<“give me another number”;

   cin >> (b);

   a2 = (a2+1);

   c= (a+b);

   cout << “the sum of the numbers is” <<c<<endl;

   cout <<“would you like to enter other values? 1)yes, 2)no”;

   cin >> (d);

 

 

 }

 while (d ==1);

 cout << “you did the operation “<<a2<< ” times”;

 return 0;

}

 

CC BY 4.0 Mastery19 by carlos green is licensed under a Creative Commons Attribution 4.0 International License.

Comments are closed.