You are on page 1of 1

Assignment using if-else

1. Input a number and find whether the number is negative, zero or positive.
Sample Input: -1 Sample Input: 21

Sample Output: negative Sample Output:


positive

2. Find the largest number of three given numbers.


Sample Input: 31 53 45
Sample Output: 45

3. You have an account in “CSE bank” and you need to check your account status.
You have a four digit pin number which you can use to logon to your account.
After login you can see your account status. Write a program to simulate the login
and account status check.
PIN=1234 PIN=1234
Balance=1200; Balance=1200;

Input: PIN=1231 Input: PIN=1234


Output: Your PIN is incorrect Output: Your Account balance is Tk.
1200

4. Write a program to input a char type data. Then print whether this data is a
number or an alphabet. Also distinguish between uppercase and lowercase letters.
Sample Input: 9 Sample Input: a
Sample Output: this is a number Sample Output: this is a lowercase
letter

Sample Input: D
Sample Output: this is an uppercase
letter.

You might also like