Friday, June 1, 2012

AIUB Campus

Assalamu Alaikum. Hope, you all are well by the grace of Almighty ALLAH. Today we learn how to solve AIUB Campus problem. Let's look at the problems.

Problem 1:
Consider the room numbers of AIUB campus  4 -  423, 432, 441, 234, 534, 132. Here first digit represents campus number, second digit represents floor number and third digit represents room number in that floor. Write a program that will take a three digit number (like 423) and output the campus, floor & room number according to the input.


Sample Input:  423
Sample Output: Campus: 4, Floor: 2, Room: 3


Solution:





























Problem 2:
Consider the room number of AIUB Campus 7 -7123, 7032, 7022, 7051. Here first digit represents Campus number, second & third digit represent floor number and the fourth digit represents the floor number in that floor. Write a program that will take a four digit number (like 7123) and output the campus, floor and room number to the input.

Sample Input:  7123
Sample Output: Campus:7, Floor: 12, Room: 3

Solution:


















Thank you all..:)

12 comments: