CSE341 Assignment 3 Solved

30.00 $

Category:
Click Category Button to View Your Next Assignment | Homework

You'll get a download link with a: . zip solution files instantly, after Payment

Description

Rate this product


Task 01

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

 

Sample input:

 

1st input: 8

2nd input: 4

3rd input: 9

 

Sample Output:

 

4

 

 

 

Task 02

 

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

 

 

Sample input:

 

1st input: 5

2nd input: 6

 

Result is 30

 

Sample Output:

 

Divisible

 

 

 

 

Sample input:

 

1st input: 5

2nd input: 2

 

Result is 10

 

Sample Output:

 

Not divisible

 

 

 

 

 

Task 03

 

Write a program which takes in a digit from 1 to 6 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:

 

4 [which represents April]

 

Sample Output:

 

30

 

 

Sample input:

 

2 [which represents February]

 

Sample Output:

 

28

 

 

 

Task 04

 

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

 

 

 

 

 

Sample input:

 

1st side: 6

2nd side: 7

3rd side: 6

4th side: 3
Sample Output:

 

N

 

 

 

Sample input:

 

1st side: 9

2nd side: 3

3rd side: 9

4th side: 3
Sample Output:

 

Y