Wednesday, 7 October 2026

Assignment 1

 C PROGRAMMING – ASSIGNMENT 1

Algorithm Writing – Logic Building
Submission: Write the algorithms neatly in your Assignment Book.
Last Date: 07/10/2026
before 4:30 PM

Submission Place: Staff Room

Instructions

Instructions

For each problem:

  1. Write the Problem Statement.

  2. Write the Algorithm using clear, numbered steps.

  3. Do not write the C program at this stage.

  4. Write the algorithm in your own words and logic.

  5. 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:

Marks

Grade / Result

90 and above

A

80 to 89

B

70 to 79

C

60 to 69

D

35 to 59

E

Below 35

F – Fail

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.

Assignment 1

  C PROGRAMMING – ASSIGNMENT 1 Algorithm Writing – Logic Building Submission:  Write the algorithms neatly in  your  Assignment Book . Last ...