Assignment 2 PF
Assignment 2 PF
You need to submit a folder titled “Your Roll Number_Assignment-2”. This folder
should only have 6 .cpp and 2 .txt files with the title of question number only. Exp:
Q1.cpp for first question’s code.
Q-1 Make following 4 animations using 4 separate loops in one program. (5 Marks)
Q-2 Write a program which takes marks of n courses as input, of m students and output
the students who got the highest aggregate. n should be between 1 to 7 and m should
be between 5 to 75 otherwise it should print invalid inputs and ask for inputs again.
(5 Marks)
1391 80 70 60 14 88
1376 70 80 80 88 89
1374 71 82 50 80 79
1372 77 90 90 99 100
1375 73 83 40 81 69
Q-3 Take 3 integers a, b and c as input and display their LCM and HCF. Your program
should keep taking inputs and keep displaying LCM and HCF at output until some
character is given at input like ‘A’ or ‘a’. (10 Marks)
Q-4 Add all the natural numbers below three thousand that are multiples of 3 or 5 but not
both. (5 marks)
Q-5 Write a program that takes inputs until user enter -1 and your program tells the
maximum and minimum number. (5 marks)
Q-6 Write a program that takes an input integer from the user and makes
another variable with reverse of the number entered. (10 marks)
e.g. if the number entered is 12345 the number constructed will be 54321