Vous êtes sur la page 1sur 3

Programming Fundamentals I

Assignment # 1

Due Date: 11-10-18 Section: F Total Marks: 30

Program: BSCS

Instructions
1. Understanding of the problems is part of the assignments. So no query please.
2. You will get Zero marks if found any type of cheating.
3. No submission after deadline.
4. Submit your assignment in Hardcopy on A4 size white sheets.

1. Draw a Flowchart that takes a value N from user and display that value and
“I am new . This is my first PF Assignment”.
2. Create a Flowchart that takes 3 values a , b, and c from the user and
compute and display only sum and average of these 3 values.
3. Draw a Flowchart that a value X as an input from user. If value entered by
user is positive, find out and display if given value is even or odd. If value
entered is not positive, display “Wrong input”.
4. Draw a Flowchart that displays “I am a student of PF – I at UOL ” 10 times.
5. Modify above question to draw a flowchart that takes a value N as an input
from user and display “I am a student of PF – I at UOL ” N times.
6. Create a Flowchart that takes a value as an input from user and print its
table.
7. Create a Flowchart that calculates a sum of 1 to 10 and display sum.
8. Draw a Flowchart takes 10 values from user and display if the value is even
or odd.
9. Draw a Flowchart that takes 2 values from user and display values in
decreasing order from first number to second number

Sample Output:
Enter First Value: 20
Enter Second Value: 6
The values in decreasing order from 20 to 6 are :
20 19 18 17 16 15 14 13 12 11 10 9 8 7 6

10. Draw a Flowchart program that takes a number from the user and display
all prime numbers till that number.

Sample Output:
Enter a Number : 16
Prime numbers are : 1 , 2 , 3 , 5 , 7 , 11 , 13

11. Flowchart that takes a value N from the user and display Fibonnaci series
till Nth term. Also, compute the sum and average of these N terms.

12. Flowchart that calculates and display 1st 100 prime numbers.

13. Create a Flowchart that takes a value N from user and display all prime
numbers till N.

14. Draw a Flowchart to calculate the sum of even numbers between 1 to 100.
Also, calculate the average of these even numbers.

15. Draw a flowchart for following:

i. Display all numbers between 1 to 100 until you get a divisible of 4.


ii. Display all numbers between 1 to 100 except divisible of 5.

16. Create a Flowchart that takes 20 values as an input from user and find the
maximum and minimum of these 20 values.

17. Draw a Flowchart that takes a number N from user and calculate and
display the factorial of N.

18. Draw a Flowchart that takes 20 values as an input from the user and find
minimum of it

19. Draw a Flowchart that takes 20 values as an input from the user and find
maximum of it
20. Write a program that takes any number N from user and display all perfect
squares till N

Sample Output1:
Enter a value
25
Perfect squares till 25 are :
1 4 9 16 25

Sample Output2:
Enter a value
125
Perfect squares till 25 are :
1 4 9 16 25 36 49 64 81 100 121

Vous aimerez peut-être aussi