Powered by Blog - Widget
Posted by : Unknown Friday, 9 May 2014

CS201-Introduction to Programming Assignement No.1 Due Date 14th May 2014 written update free online

Please read the following instructions carefully before submitting assignment. It should be clear that your assignment will not get any credit if:
The assignment is submitted after due date.
The submitted assignment does not open or file is corrupt.
Assignment is copied(partial or full) from any source (websites, forums, students, etc)

Note: You have to upload only .cpp file. Assignment in any other format (extension) will not be accepted and will be awarded with zero marks. For example, if you submit code in .doc (Word document) or .txt files or .exe file, no reward will be given in any case.

Objective:
The objective of this assignment is to provide hands on experience of
Basic concepts of C/C++ language and Programming
Dealing with Data types
Conditional statements of C/C++ language
Repetition Structures (Loop)
Switch statement

Guidelines:
Code should be properly indented and well commented.
Follow C/C++ rules while writing variable names, function names etc
Use only dev-C++ for this assignment.

Assignment 
Problem Statement: 
You are required to write a C++ program using loop and switch statement. The program should display even or odd numbers from 1 to 50 depending upon the option given

Detailed Description:
The program should prompt the user for one character option (either ‘e’, ‘E’ or ‘o’, ‘O’). 
It should respond in the following ways:

If user enters character option ‘e’ or ‘E’ then it should display the even numbers from 1 to 50.
If user enters character option ‘o’ or ‘O’ then it should display the odd numbers from 1 to 50.
Sample output of the program:

If user enters ‘e’ then it displays the even numbers from 1 to 50.
If user enters ‘E’ then it displays the even numbers from 1 to 50
If user enters ‘o’ then it displays the odd numbers from 1 to 50.
If user enters ‘O’ then it displays the odd numbers from 1 to 50.

Leave a Reply

Subscribe to Posts | Subscribe to Comments

- Copyright © My Pak Tv Media - Skyblue - Powered by Blogger - Designed by Johanes Djogan -