- 4
Logical Statements
You're a tour manager and need a program that will identify small countries. A country is considered small if its population is under 10000 and its area is under 10000 hectares. The given program takes population and area as input. Task Complete the program to output "small country" if both conditions are met. Don't output anything otherwise. Sample Input 9955 7522 Sample Output small country Use && to combine conditions.
5 Antworten
+ 2
Complete the program to output "small country" if both conditions are met. Don't output anything otherwise.
0
You're a tour manager and need a program that will identify small countries.
A country is considered small if its population is under 10000 and its area is under 10000 hectares.
The given program takes population and area as input.
- 1
So you have two integers user input to get from user: population and area,so it will be easy to use if statement if population < 10000 && area < 100000 then print small country.
- 2
input your sample in this code!!!
https://code.sololearn.com/cTPMoQiQrQ0t/?ref=app
- 2
Wienny Natalia
Is this a challenge or your homework?
If it is a challenge, then I can provide details of the correct way to place it on Sololearn.
If it is homework then it is SPAM.
Please reserve the Q&A forum for coding related questions pertaining to your personal difficulties