0% found this document useful (0 votes)
12 views3 pages

Program No 3

The document presents a C program that takes input for a student's name, roll number, and marks in four subjects, then calculates and displays the percentage score. It includes the source code, a statement of the program's purpose, an algorithm outlining the steps, and a flowchart of the process. The program is designed to handle inputs and outputs related to student academic performance.

Uploaded by

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

Program No 3

The document presents a C program that takes input for a student's name, roll number, and marks in four subjects, then calculates and displays the percentage score. It includes the source code, a statement of the program's purpose, an algorithm outlining the steps, and a flowchart of the process. The program is designed to handle inputs and outputs related to student academic performance.

Uploaded by

Devanshu Jaat
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd

DEVANSHU 1324035

4. SOURCE CODE:
#include<stdio.h>
#include<conio.h>
void main();
{ //variable declaration
char name[50];
int rollno;
float sub1,sub2,sub3,sub4;
float obtained;
float per;
//Take input for above
{ printf(“Enter the name of Student:”);
scanf(“%s”,name);
printf=(“Enter the RollNo of Student:”);
scanf=(“%d”,&rollno);
printf=(“sub1:”);
scanf=(“%f”,&sub1);
printf=(“sub2:”);
scanf=(“%f”,&sub2);
printf=(“sub3:”);
scanf=(“%f”,&sub3);
printf=(“sub4:”);
scanf=(“%f”,&sub4);
//Calculate the percentage
obtained=sub1+sub2+sub3+sub4;
per=(obtained/400)*100;
//Display the information
printf(“\nName of the Student:%s”,name);
printf(“\nRollNo of the Student:%d”,rollno);
printf(“\nPercentage of the Student:%f”,per);
}
getch();
}
DEVANSHU 1324035

5. OUTPUT:
DEVANSHU 1324035

PROGRAM NO.3
1. STATEMENT:
Write a program to take input of name, rollno and marks
obtained by a student in 4 subjects of 100 marks each and
display the name, rollno with percentage score secured.

2. ALGORITHM:
Step1: Start
Step2: Declaration of variable
Step3: Input of the variables
Step4: Calculate the percentage
Step5: Output of information
Step6: Stop

3. FLOW CHART:
START

Input the variables

Calculate the percentage

Output of information

STOP

You might also like