Algorithm Writing – Logic BuildingC PROGRAMMING – ASSIGNMENT 1
Submission: Write the algorithms neatly in your Assignment Book.
Last Date: 07/10/2026
before 4:30 PM
Submission Place: Staff Room
Instructions
For each problem:
Write the Problem Statement.
Write the Algorithm using clear, numbered steps.
Do not write the C program at this stage.
Write the algorithm in your own words and logic.
Keep the same assignment book safely. The C program for these problems will be written in the same book later.
Assignment 1
1. Largest and Smallest
Write an algorithm to read n numbers from the user and find the largest and smallest numbers.
2. Largest Even and Largest Odd
Write an algorithm to read n numbers from the user and find the largest even number and the largest odd number.
3. Student Result and Grade
Write an algorithm to read the marks obtained in a subject and display the result according to the following criteria:
Note: Assume that the marks are between 0 and 100.
4. Numbers Divisible by 3 and 7
Write an algorithm to generate and display the first n positive numbers that are divisible by both 3 and 7.
5. Fibonacci Series
Write an algorithm to generate and display the first n Fibonacci numbers.
6. Electricity Bill Calculation
Write an algorithm to calculate the electricity bill using two slab-wise rates.
Use the following slabs:
First 100 units → ₹5 per unit
Above 100 units → ₹7 per unit
The algorithm should read the number of units consumed and calculate the total bill.
