Starting from:

$30

CSE341- Assignment Lab 03 Solved

Task 01 

 

Write a program which takes in 3 digits as input from the user and finds the maximum 

 

Sample input:  

 

1st input: 4 

2nd input: 7 

3rd input: 3 

 

Sample Output: 

 



 



Task 02 

 

Take two digits as input from the user and multiply them. If the result is divisible by 3 or 5 but not both, print “Divisible”. Otherwise print “Not divisible” 

 

 

Sample input:  

 

1st input: 5 

2nd input: 5 

 

Result is 25 

  

Sample Output: 

 

Divisible 

 


 

Sample input:  

 

1st input: 10 

2nd input: 6 

 

Result is 60 

  

Sample Output: 

 

Not divisible 

 


 

Task 03 

 

Write a program which takes in a digit from 1 to 7 where each digit represents a month in a calendar year. For example the digit 1 represents January, 2 represents February, and 3 represents March and so on. Your program should then output the total number of days in that month 

 

 

Sample input:  

 

7 [which represents July] 

 

Sample Output: 

 

31 

 

 

Sample input:  

 

2 [which represents February] 

 

Sample Output: 

 

28/29 

 

 

 

Task 04 

 

Write a program that takes as input the length of 4 sides of a square and check whether a valid square can be formed or not. If the sides form a square, print “Y”, otherwise print “N”. 

 

 

Sample input:  

 

1st side: 7 

2nd side: 7 3rd side: 7 4th side: 7 

  

Sample Output: 

 



 

Sample input:  

 

1st side: 7 

2nd side: 8 3rd side: 9 4th side: 5 

  

Sample Output: 

 

More products