write a program that takes two numbers from user that
prints the smallest number
Answer Posted / vaishnavi
#include<iostream.h>
void main()
{
int a,b;
cout<<"Enter two numbers";
cin>>a>>b;
if(a>b)
cout<<a<<"is greater";
else
cout<<b<<is greater";
}
Is This Answer Correct ? | 2 Yes | 1 No |
Post New Answer View All Answers
Write a program which is required to process the time of a clock in hours and minutes, entered from the keyboard. With this program, there are two requirements for any data entered by a user: 1. The data must be of the correct type (in this case, two ints). 2. The data must be in the correct range: this means that, for the minutes, negative numbers and any number above 59 must be rejected; for the hours, negative numbers and any number above 23 must be rejected. Output error message for invalid data input. Output the time one and a half hour after the time input. i.e. Hour: 22 Min: 32 One and a half hour after 22:32 is 00:02
What is the difference between an external iterator and an internal iterator?
Why is c++ awesome?
What is vector processing?
what is C++ exceptional handling?
Can you be bale to identify between straight- through and cross- over cable wiring? And in what case do you use straight- through and cross-over?
What is pointer -to-members in C++? Give their syntax?
What are the defining traits of an object-oriented language?
What are compilers in c++?
What relational operators if statements in c++?
What is data abstraction? How is it different from data encapsulation?
Is there any function that can skip certain number of characters present in the input stream?
What is the meaning of string in c++?
Explain how functions are classified in C++ ?
What is name hiding in c++?