#include<iostream.h>

#define MULTI(a, b) a*b
#define DIV(a, b) a/b
#define ADD(a, b) a+b
#define SUB(a, b) a-b

void main()
{
	float a, b, c[4];
	int i; 
	char d='y';
	while(d=='y'||d=='Y')
	{
		cout<<"Enter the 2 nos.";
		cin>>a>>b;
		c[0]=MULTI(a, b);
		c[1]= DIV(a, b);
		c[2]= ADD(a, b);
		c[3]= SUB(a, b);
		cout<<"Answers(Order *, /, +, -):\n";
		for(i=0;i<4;i++)
		{
			cout<<"\n"<<i<<")"<<c[i]<<endl;
		}
		cout<<"\nAnother one(yes/no): ";
		cin>>d;
	}
}
3
Contributors
2
Replies
5
Views
13 Years
Discussion Span
Last Post by bumsfeld
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.