0% found this document useful (0 votes)
6 views

Assignment

Uploaded by

bogojupranay1
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
6 views

Assignment

Uploaded by

bogojupranay1
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

Assignment 1

Develop a pseudocode or algorithm and flowchart for any 5 problems from the list
Deadline : 6 September 2024

• Print the Sum of first 50 numbers


• Calculate given number is prime or not
• Print first 15 prime numbers

• Write algorithm that reads two numbers and divide one by another and
display the quotient.
• Write the algorithm to print all multiples of 5 between 10 and 25 (including
both 10 and 25).
• Suppose you are collecting money for something. You need ‘ 200 in all.
You ask your parents, uncles and aunts as well as grandparents. Different
people may give either ‘ 10, ‘ 20 or even ‘ 50. You will collect till the total
becomes 200. Write the algorithm.

• Write the algorithm to print the bill depending upon the price and quantity
of an item. Also print Bill GST, which is the bill after adding 5% of tax
in the total bill
• Write pseudocode that will perform the following:
a) Read the marks of three subjects: Computer Science, Mathematics
and Physics, out of 100
b) Calculate the aggregate marks
c) Calculate the percentage of marks
• Write an algorithm to find the greatest among two different numbers en-
tered by the user.

• Write an algorithm that performs the following: Ask a user to enter a


number. If the number is between 5 and 15, write the word GREEN. If
the number is between 15 and 25, write the word BLUE. if the number is
between 25 and 35, write the word ORANGE. If it is any other number,
write that ALL COLOURS ARE BEAUTIFUL.

1
• Write an algorithm that accepts four numbers as input and find the largest
and smallest of them.
• Write an algorithm to display the total water bill charges of the month
depending upon the number of units consumed by the customer as per the
following criteria:

– for the first 100 units @ 5 per unit


– for next 150 units @ 10 per unit
– more than 250 units @ 20 per unit
Also add meter charges of 75 per month to calculate the total water bill

• Write a Algorithm to calculate the factorial of a number ( Hint: Factorial


of 5, written as 5! =5 × 4× 3× 2×1) .
• Draw a algorithm & flowchart to check whether a given number is an
Armstrong number. An Armstrong number of three digits is an integer
such that the sum of the cubes of its digits is equal to the number itself.
For example, 371 is an Armstrong number since 3*3*3 + 7*7*7 + 1*1*1
= 371.

You might also like