Implementataion of Simple Programs-Introduction to Computer Programming, Exercises of Computer Engineering and Programming

This assignment was given by Dr. Jyoti Lokesh at Biju Patnaik University of Technology, Rourkela for Computer Programming course. It includes: Implement, Program, Indication, Package, Integers, Infinite, Number, Plagiarism

Typology: Exercises

2011/2012

Uploaded on 07/13/2012

ekvir
ekvir 🇮🇳

4

(1)

35 documents

1 / 1

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
INTRODUCTION TO COMPUTING-LAB
FALL 2011
PROGRAMMING ASSIGNMENT III
Note: Implement the given programs in to C++
Program-1: Percentage marks attained by a student in three exams are to be entered to
a computer. An indication of Pass or Fail is given out after the three marks are entered.
The criteria for passing are as follows:
o A student passes if all the three examinations are passed. Additionally a
student may pass if only one subject is failed and the overall average is
greater than or equal to 50. The pass mark for an individual subject is
greater than or equal to 50. The pass marks for an individual subject is 40
Program-2: A shopkeeper announces a package for customers that he will give 10%
discount on all bills and if a bill amount is greater than 5000 than a discount of 15%.
Write a C++ program which takes amount of the bill from user and calculates the
payable amount by applying the above discount criteria and display it on the screen
Program-3: Write a program that takes a four digits integer from user and shows the
digits on the screen separately i.e., 7531, it displays 7,5,3,1 separately.
Program-4: If three integers a, b and c are such that a2+b2=c2 then they constitute a
Pythagorean triple. There are an infinite number of such triples. One way of generating
them as follows:
o Consider two integers m and n, such that m>n then the three numbers m2-
n2, 2mn and m2+n2 are a Pythagorean triple. Write a C++ program that
reads values for m and n and prints the values of the corresponding
Pythagorean triple
Directions: Understand the Problems thoroughly and implement them by yours own
don’t copy or cheat of any of yours mate because demonstration in class of individual
student will be held according to the given plan of five students in a class, in case of
plagiarism detected the person will be directly given 0. Good luck and May Allah Pak
bless you.
Deadline: 30th Nov 2011
docsity.com

Partial preview of the text

Download Implementataion of Simple Programs-Introduction to Computer Programming and more Exercises Computer Engineering and Programming in PDF only on Docsity!

INTRODUCTION TO COMPUTING-LAB

FALL 2011

PROGRAMMING ASSIGNMENT– III

Note : Implement the given programs in to C++

Program-1 : Percentage marks attained by a student in three exams are to be entered to a computer. An indication of Pass or Fail is given out after the three marks are entered. The criteria for passing are as follows: o A student passes if all the three examinations are passed. Additionally a student may pass if only one subject is failed and the overall average is greater than or equal to 50. The pass mark for an individual subject is greater than or equal to 50. The pass marks for an individual subject is 40  Program-2: A shopkeeper announces a package for customers that he will give 10% discount on all bills and if a bill amount is greater than 5000 than a discount of 15%. Write a C++ program which takes amount of the bill from user and calculates the payable amount by applying the above discount criteria and display it on the screen  Program-3: Write a program that takes a four digits integer from user and shows the digits on the screen separately i.e., 7531, it displays 7,5,3,1 separately.  Program-4: If three integers a, b and c are such that a^2 +b^2 =c^2 then they constitute a Pythagorean triple. There are an infinite number of such triples. One way of generating them as follows: o Consider two integers m and n, such that m>n then the three numbers m^2 - n2,^ 2mn and m^2 +n^2 are a Pythagorean triple. Write a C++ program that reads values for m and n and prints the values of the corresponding Pythagorean triple

Directions: Understand the Problems thoroughly and implement them by yours own don’t copy or cheat of any of yours mate because demonstration in class of individual student will be held according to the given plan of five students in a class, in case of plagiarism detected the person will be directly given 0. Good luck and May Allah Pak bless you.

Deadline: 30 th^ Nov 2011

docsity.com