The numbers are passed as the input to the program. If at least one of the numbers is equal to 100, the program must print yes. Else the program must print no.
Example Input/Output 1:
Input:
50 100
Output:
yes
Example Input/Output 2:
Input:
34 60
Output:
no
Example Input/Output 3:
Input:
100 100
Output:
yes
Python
X, Y = map(int, input().split())
if X == 100 or Y == 100:
print('yes')
else:
print('no')
Java
import java.util.*;
public class Hello {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int X = sc.nextInt();
int Y = sc.nextInt();
if (X == 100 || Y == 100) {
System.out.print("yes");
} else {
System.out.print("no");
}
}
}
C
#include <stdlib.h>
#include <stdio.h>
int main()
{
int X,Y;
scanf("%d%d",&X,&Y);
if(X==100 || Y==100)
{
printf("yes");
}
else
{
printf("no");
}
}
C++
#include <iostream>
using namespace std;
int main()
{
int X, Y;
cin >> X >> Y;
if(X == 100 || Y == 100)
{
cout << "yes";
}
else
{
cout << "no";
}
return 0;
}
Leave a Reply