PPS Practical 32
- Aim: Write a C program to read and store the roll no and marks of 20 students using array.
- Code:
//For turbo C++ remove below comments #include <stdio.h> //#include<conio.h> void main() { int r[20], marks[20],i; //clrscr(); for (i = 0; i < 20; i++){ printf("Enter roll no : "); scanf("%d",&r[i]); printf("Enter marks for roll no. %d : ",r[i]); scanf("%d",&marks[i]); } printf("\nRoll no.\tMarks:"); for (i = 0; i < 20; i++){ printf("\n%d\t\t%d",r[i],marks[i]); } // getch(); }
21
ReplyDelete