write a program that takes two numbers from user that
prints the smallest number
Answers were Sorted based on User's Feedback
Answer / hemant jakkani
#include <stdio.h>
#include <string.h>
main()
{
int x,y;
scanf("%d%d",&x,&y);
if(x>y)
printf("First Number is greater: %d",x);
else
printf("Second Number is greater:%d",y);
}
Is This Answer Correct ? | 6 Yes | 1 No |
Answer / 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 |
What are the extraction and insertion operators in c++?
Is c or c++ more useful?
Can we distribute function templates and class templates in object libraries?
Which one is a preferred language C or C++? Why?
Explain what data encapsulation is in c++?
Explain what are the sizes and ranges of the basic c++ data types?
Why are pointers not used in c++?
What is guard code in c++?
Is java based off c++?
Show the declaration for a pointer to function returning long and taking an integer parameter.
Can the operator == be overloaded for comparing two arrays consisting of characters by using string comparison?
Is c++ a pure oop language?