Discover answers to your questions with Westonci.ca, the leading Q&A platform that connects you with knowledgeable experts. Discover comprehensive answers to your questions from knowledgeable professionals on our user-friendly platform. Get immediate and reliable solutions to your questions from a community of experienced professionals on our platform.
Sagot :
Using the knowledge in computational language in C++ it is possible to write a code that asks the user to enter two numbers. the program should use the conditional operator to determine which number is the smaller and which is the larger.
Writting in C++ code:
#include <iostream>
using namespace std;
int main(){
float a, b;
cout<<"Enter two numbers:";
cin>>a>>b;
if(a>b) {
cout<<"Larger Number:"<<a<<endl;;
cout<<"Smaller Number:"<<b;
}
else if(b<a){
cout<<"Larger Number:"<<b<<endl;
cout<<"Smaller Number:"<<a;
}else{
cout<<"Number are equal!"<<endl;
}
}
See more about C++ code at brainly.com/question/19705654
#SPJ1
We hope you found this helpful. Feel free to come back anytime for more accurate answers and updated information. We appreciate your time. Please come back anytime for the latest information and answers to your questions. Westonci.ca is committed to providing accurate answers. Come back soon for more trustworthy information.