Essay

352 Words2 Pages
Deadline: 24h October 2011 INTRODUCTION TO COMPUTING-LAB FALL 2011 PROGRAMMING ASSIGNMENT– I 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: * 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: * 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

More about Essay

Open Document