Ads

Pages

Wednesday, November 3, 2010

CS201 Assignment Solution

Instructions: Please read the following instructions carefully before submitting your 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.

All types of plagiarism are strictly prohibited.

Note:You have to upload only .cpp file. Assignment in any other format (extension) will not be accepted. If you will submit code any other file format like .doc or .txt etc. you will get zero marks.

Objective

The objective of this assignment is to provide hands on experience of using

§Basic concepts of C/C++ language and Programming

§Writing, Compiling and Executing a C program

§Conditional statements of C language

§Loops in C language

Guidelines

§Code should be properly aligned and well commented.

§Follow C/C++ rules while writing variables names, function names etc.

§Use only Dev-C++ IDE for this assignment.

Assignment

Problem Statement: Calculating No. of A Grades in Class

You are required to write a program which should take input from user in the form of characters A or B. Based upon user's input you should calculate no. of A grades. You should use while loop or do/while loop for taking input and if / else condition for making decisions.


Detailed Description:

The program should display like;

Please Enter Grade ('A' OR 'B' )

Then the program should take 10 inputs one by one,

After taking 10 inputs, you should display no. of A grades.

If A grades are less than or equal to 2, you should display a message "Your class is Poor!".

If A grades are less than or equal to 7, you should display a message "Your class is Good!".

If A grades are greater than or equal to 8, you should display a message "Your class is Brilliant!".

The user should enter either A or B. If user has entered other than A or B, e.g. C,D,E etc. Your program should display a message like;

"Please Enter 'A' or 'B' grade only!"



Sample Input and Output


Please Enter Grade of student 1 : A Please Enter Grade of student 2 : A Please Enter Grade of student 3 : B Please Enter Grade of student 4 : A Please Enter Grade of student 5 : B Please Enter Grade of student 6 : B Please Enter Grade of student 7 : A Please Enter Grade of student 8 : B Please Enter Grade of student 9 : CPlease Enter 'A' or 'B' grade only! Please Enter Grade of student 9 : A Please Enter Grade of student 10 : A


Total No. of A Grades = 6


Your Class is Good!

Deadline:

Your Assignment solution must be uploaded/submitted on or before November 05, 2010

SOLUTION:

using namespace std;

#include
#include


main()

{
int totalstudent=1;
int A =0,B=0;

char grad(1);

while (totalstudent <= 10)
{
cout"Please Enter Grade of student "totalstudent" :\n";
cin>>grad;
if (grad=='a' or grad =='A')
{
A = A+1;
totalstudent++;
}
else if (grad=='b' or grad =='B')
{
B += 1;
totalstudent++;
}
else
{
cout"\nPlease Enter 'A' or 'B' grade only! \n";

}
}

cout"Total No. of A Grades "A" :\n";


if (A <=2)
{
cout"\nYour class is Poor!\n";
}else if (A <=7)
cout"\nYour class is Good!\n";
else
{
cout"\nYour class is Brilliant!\n";
}
getche();
}

Fin623 GDB No. 1 Announced

otal Marks 2

Starting Date Wednesday, November 03, 2010

Closing Date Friday, November 05, 2010


Question/Description

A Pakistani company hires the services of an expatriate employee. The employee relocation costs to move to Pakistan are paid for by the company. Will the expatriate be required to pay tax on such costs? Give reason and also mention the relevant section.

Mgt602 Online Quiz No. 1 Announced

On-Line Quiz (No.01) Announcement

Dated: Nov 02, 10

On-Line Quiz (No.01) Announcement

Entrepreneurship (MGT602)

Quiz will cover video lecture no. 1 to 12


Schedule

Opening Date and Time

November 03, 2010 At 12:01 AM (Mid-Night)

Closing Date and Time

November 05, 2010 At 11:59 PM (Mid-Night)


Mgt201 GDB No. 1 Announced

Semester “Fall 2010”

“Financial Management (MGT201)”
This is to inform that Graded Discussion Board (GDB) has opened according to the following schedule
Schedule

Opening Date and Time

November 03, 2010 At 12:01 A.M. (Mid-Night)

Closing Date and Time

November 05, 2010 At 11:59 P.M. (Mid-Night)


Note: No extra or bonus/grace period is available for attempting GBD.

XYZ enterprises is planning for capital expenditure and for this purpose, it is considering two mutually exclusive projects. Each requires an initial investment of Rs.50,000. The president of XYZ Enterprises has set the maximum acceptable payback period of 4 years. After tax cash inflows associated with each project are as follows:

Cash inflows
Year
Project A
Project B

1
10,000
Rs.12,000

2
14,000
12,000

3
18,000
12,000

4
10,000
12,000

5
11,000
12,000

a) Determine the payback period of Project A and state whether it is acceptable?

b) Determine the payback period of Project B and state whether it is acceptable?

Mgt603 GDB No. 1 Announced

Total Marks 2

Starting Date Wednesday, November 03, 2010

Closing Date Friday, November 05, 2010

For ensuring success in business, top management applies different kind of strategies. Suppose if you are a CEO of any bank, what kind of strategies you may design for the better growth and success.