NAME-Mayank Popli
ROLL NO.1324595
PROGRAM-03
[3] Write a program to take input of name, roll no, and marks obtained by a student in 4 subjects of
100 marks each and display the name, roll no with percentage score secured.
1] ALGORITHM-
Step 1) Start
Step 2) Declare the variables
Step 3) Initialize the data
Step 4) print the information
Step 5) Stop
2] FLOWCHART-
START
Declare the value
Initialize the value
Display the information
stop
3] SOURCE CODE-
#include<stdio.h>
#include<conio.h> Void main()
{ char name[50]; int rollNumber;
float marks; int main()
printf("Enter student name: ");
scanf("%s", student.name);
printf("Enter roll number: ");
scanf("%d", &student.rollNumber);
printf("Enter marks 1:/n”);
scanf(“%d”,&marks1); printf(“enter
marks2:/n”); scanf(“%d”,&marks2);
printf("Enter marks 3:/n”);
scanf(“%d”,&marks3); printf("Enter
marks 4:/n”);
scanf(“%d”,&marks4);
Percentage=(marks1+marks2+marks3+marks4/4.0;
printf("\nStudent Information:\n"); printf("Name:
%s\n", student.name); printf("Roll Number: %d\
n", student.rollNumber); printf(“percentage
score:%2f%%\n”,percentage)
return 0;
4] OUTPUT-