Computer System and Programming
Assignment # 1
Instructions:
1. This assignment is only for DE38-ME-Syndicate A.
2. The solution of the assignment should include the code and the output of the programme.
3. Assignment is to be submitted individually in the form of hard copy (printed form).
4. Copying from one another or the internet isn’t permitted. Both (or more) parties involved
in plagiarising will be awarded zero marks. Assignment in which the code has been copied
from the internet will also be awarded zero marks.
5. In case of any queries, feel free to contact me.
6. The submission deadline of the assignment is November 11th
, 2016 before 04:00 p.m.
Question 1:
Write a programme that takes an input from the user in the range of 1 to 500 and tells whether
the number is prime or not.
Question 2:
Take an alphabet as an input from the user and display the next alphabet. If the user enters a
special character, the programme should display that the character entered is a special
character.
Question 3:
Write a programme that displays the digits separately of a number entered by the user. For
example, if the user enters 19231, your programme should display 1 3 2 9 1.
Question 4:
Take the age of the user as an input in dd/mm/yyyy format and calculate the user’s age in days.
1 year has 365 days while a month, on average, has 30 days.
Question 5:
Write a programme that calculates the final bonus of an employee. The bonus is calculated by
multiplying the number of years that employee has worked for the company by 50 percent of
their monthly pay. If the user has worked for over 10 years, then for each year after the 10th
year, the employee gets 2500 added to the final bonus.
Question 6:
A light year is the distance travelled by a beam of light in a year. The speed of light is
299 792 458 m / s. Ask the user to enter the number of years and calculate the distance that the
light beam will travel in that time. Display the distance in kilometres and miles.

Assignment # 1 c++ computer system and Programming EC-105

  • 1.
    Computer System andProgramming Assignment # 1 Instructions: 1. This assignment is only for DE38-ME-Syndicate A. 2. The solution of the assignment should include the code and the output of the programme. 3. Assignment is to be submitted individually in the form of hard copy (printed form). 4. Copying from one another or the internet isn’t permitted. Both (or more) parties involved in plagiarising will be awarded zero marks. Assignment in which the code has been copied from the internet will also be awarded zero marks. 5. In case of any queries, feel free to contact me. 6. The submission deadline of the assignment is November 11th , 2016 before 04:00 p.m. Question 1: Write a programme that takes an input from the user in the range of 1 to 500 and tells whether the number is prime or not. Question 2: Take an alphabet as an input from the user and display the next alphabet. If the user enters a special character, the programme should display that the character entered is a special character. Question 3: Write a programme that displays the digits separately of a number entered by the user. For example, if the user enters 19231, your programme should display 1 3 2 9 1. Question 4: Take the age of the user as an input in dd/mm/yyyy format and calculate the user’s age in days. 1 year has 365 days while a month, on average, has 30 days. Question 5: Write a programme that calculates the final bonus of an employee. The bonus is calculated by multiplying the number of years that employee has worked for the company by 50 percent of their monthly pay. If the user has worked for over 10 years, then for each year after the 10th year, the employee gets 2500 added to the final bonus. Question 6: A light year is the distance travelled by a beam of light in a year. The speed of light is 299 792 458 m / s. Ask the user to enter the number of years and calculate the distance that the light beam will travel in that time. Display the distance in kilometres and miles.