GTU Programming for Problem Solving Practical-32
//Write a C program to read and store the roll no and marks of 20 students using array.
#include <stdio.h>
int main(void)
{
int r[20], m[20], i;
for (i = 0; i < 20; i++)
{
printf("Enter a rollnumber[%d]: ", i + 1);
scanf("%d", &r[i]);
printf("Enter marks[%d]: ", i + 1);
scanf("%d", &m[i]);
}
for (i = 0; i < 20; i++)
{
printf("\nroll no:%d marks:%d", r[i], m[i]);
}
return 0;
}
Review All Practicals:- https://getyourcodehere.blogspot.com/p/gtu-programming-for-problem-solving.html?m=1
0 Comments