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

C Programming Lab Model 25

Uploaded by

saccoubaye.16
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
11 views

C Programming Lab Model 25

Uploaded by

saccoubaye.16
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

C Programming Lab

Write an algorithm and C program to solve simple computational problems using arithmetic
expressions and the use of each operator leading to the simulation of a commercial calculator
(add, sub, multiply, division and modulus). (No built-in math function).

Write an algorithm and C program to compute the roots of a quadratic equation by accepting the
coefficients. Print appropriate messages.

Write an algorithm and C program


(i) To find the reverse of a positive integer and check for palindrome or not Display
appropriate messages.
(ii) To find the square root of a given number N and execute for all possible inputs with
appropriate messages. Note: Don’t use library function sqrt(n)

Write an algorithm and C program for an Electricity board charges. The following rates for the
use of electricity:
for the first 200 units 80 paise per unit:
for the next 100 units 90 paise per unit:
beyond 300 units Rs 1 per unit.
All users are changed a minimum of Rs. 100 as meter charge. If the total amount is more than Rs
400, then an additional surcharge of 15% of total amount is charged. Write a program to read the
name of the user, number of units consumed and print out the charges.

Write an algorithm and C program


(i) Using pointers to compute the sum and standard deviation of all elements stored in an
array of n real numbers.
(ii) To list the leap years from 1998 to 2025 and count number of leap years in this
period.
Write an algorithm and C program to implement Recursive functions for binary to Decimal
Conversion

Write an algorithm and C program to conduct the annual examination for 10 students for five
subjects. Write a program to read the data and determine the following:
(i) Total marks obtained by each student.
(ii) The highest marks in each subject and the name of the student who secured it.
(iii) The student who obtained the highest total marks.

Write an algorithm and C program to generate a bill that gives his total purchase amount,
discount amount and the savings amount for a company manufactures three products namely
fridge, smart TVs and washing machines. They give a discount of 10% on order for fridges if
the order is for Rs. 30,000 or more. The same discount of 10% is given on smart TVs orders of
value Rs. 40,000 or more and on washing machine orders for Rs. 35,000 or more. A dealer
purchases a few fridges, smart TVs and washing machines.

Write an algorithm and C program


(i) To read 10 numbers
(ii) To sort these 10 numbers in decendig order
(iii) To find a given number is present or not
(iv) To remove duplicate numbers

Write an algorithm and C program


(i) To print the first letter of each word.
(ii) To reverse a string using recursion

You might also like