Written by students who passed Immediately available after payment Read online or as PDF Wrong document? Swap it for free 4.6 TrustPilot
logo-home
Exam (elaborations)

Program's basic C language

Rating
-
Sold
-
Pages
29
Grade
A+
Uploaded on
23-01-2026
Written in
2025/2026

It contains all basic C programs that will help you to understand programming.

Institution
Course

Content preview

Pranveer Singh Institute of Technology, Kanpur
Odd Semester 2025-26




B.Tech-First Year
Semester-I

LAB FILE

PROGRAMMING USING C (CS-152)



SUBMITTED TO: SUBMITTED BY:

NAME OF FACULTY: NAME OF STUDENT:

DESIGNATION: ROLL NO:

DEPARTMENT: BRANCH:

, LAB PROGRAMS INDEX
Lab
OBJECTIVES DATE MARKS SIGN.
No.

i) Money’s Interest
1
ii) Roots of Quadratic Equation

i) GCD of Two Numbers
2
ii) Nth Fibonacci Term

i) Armstrong in a Range
3
ii) Check Prime

i) Checking Perfect Number
4
ii) Pascal's Triangle Printing


i) GCD of two numbers
5
ii) Reverse by Recursion

i) Linear Searching
6
ii) Binary Searching

i) Bubble sort
7
ii) Matrix Multiplication

i) Anagram Strings
8
ii) Sorting N Strings

i) Creation and Traversing Linked List
9
ii) Topper from Student Records

i) Copy the content of one file into another.
10 ii) Save the records of n employees in the file.

, LAB-1
PROGRAM-1: Money’s Interest
OBJECTIVE: Interest is defined as the cost of borrowing money, as in the case of interest charged on a loan
balance. Interest can also be the rate paid for money on deposit, as in the case of a certificate of deposit. Interest
can be calculated in two ways: simple interest or compound interest. Simple interest is calculated on the
principal, or original, amount of a loan. Compound interest is calculated on the principal amount and the
accumulated interest of previous periods, and thus can be regarded as “interest on interest.”
Input Format:
A line contains three space separated values for: p, r & t.
Output Format:
Print Simple-Interest and Compound-Interest values separated by space in two decimal places
PROGRAM:
#include<stdio.h>
#include<math.h>
int main()
{
int p,t;
float r,ci,si;
scanf("%d %f %d",&p,&r,&t);
si=(p*r*t)/100;

ci=p*pow((1+r/100),t)-p;
printf("%.2f %.2f",si,ci);
return 0;
}




1

Written for

Institution
Course

Document information

Uploaded on
January 23, 2026
Number of pages
29
Written in
2025/2026
Type
Exam (elaborations)
Contains
Questions & answers

Subjects

$21.59
Get access to the full document:

Wrong document? Swap it for free Within 14 days of purchase and before downloading, you can choose a different document. You can simply spend the amount again.
Written by students who passed
Immediately available after payment
Read online or as PDF

Get to know the seller
Seller avatar
prateekpandey

Get to know the seller

Seller avatar
prateekpandey PRANVEER INSTITUTE OF TECHNOLOGY kanpur
Follow You need to be logged in order to follow users or courses
Sold
-
Member since
3 months
Number of followers
0
Documents
1
Last sold
-

0.0

0 reviews

5
0
4
0
3
0
2
0
1
0

Why students choose Stuvia

Created by fellow students, verified by reviews

Quality you can trust: written by students who passed their tests and reviewed by others who've used these notes.

Didn't get what you expected? Choose another document

No worries! You can instantly pick a different document that better fits what you're looking for.

Pay as you like, start learning right away

No subscription, no commitments. Pay the way you're used to via credit card and download your PDF document instantly.

Student with book image

“Bought, downloaded, and aced it. It really can be that simple.”

Alisha Student

Working on your references?

Create accurate citations in APA, MLA and Harvard with our free citation generator.

Working on your references?

Frequently asked questions