Question
Ada is one of the Standardized and strongest programming language and has rich set of operators. Consider the following C++ code and write the equivalent code in Ada programming language to get the similar results by using the variables and constructs.
#include
#include
using namespace std;
int main()
{
float First, Second, Result;
char operators;
cout"Enter First values : ";
cin>>First;
cout"Enter Second value : ";
cin>>Second;
coutendl"Enter any operator like +, -, /,* : ";
cin>>operators;
switch(operators)
{
case '+':
Result = First + Second;
break;
case '-':
Result = First - Second;;
break;
case '*':
Result = First * Second;
break;
case '/':
Result = First / Second;
break;
default:
cout"Invalid operation: Program terminated." endl;
}
coutendl"Result = " Result endl;
getch();
return 0;
}
Guidelines :