0% found this document useful (0 votes)
28 views

Reg No Name Sname Per Wint Sem1 c1 c2 I J Reg Name Sname Per No c1 c2 I I c1 I Wint I

The document contains code for a C program that takes student registration details like registration number, name, school details, percentage, phone number and courses taken in different semesters as input and prints the input details.

Uploaded by

Akshat Pattiwar
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
28 views

Reg No Name Sname Per Wint Sem1 c1 c2 I J Reg Name Sname Per No c1 c2 I I c1 I Wint I

The document contains code for a C program that takes student registration details like registration number, name, school details, percentage, phone number and courses taken in different semesters as input and prints the input details.

Uploaded by

Akshat Pattiwar
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2

#include<stdio.

h>
#include<string.h>
int main()
{
    char  reg[100],no[100];
    char name[100];
    char sname[100]; 
    float per;
    char wint[100][100];
    char sem1[100][100];
    int c1,c2,i,j;
  printf("enter reg no.\n");
  scanf("%s",reg);
  printf("enter name \n");
  scanf("%s",name);
  printf("enter 12 school name\n");
  scanf("%s",sname);
  printf("enter 12 percentage\n");
  scanf("%f",&per);
  printf("eneter phone number\n");
  scanf("%s",&no);
  printf("enter no. of course  in winter sem \n");
  scanf("%d",&c1);
  printf("enter no. of course  in  sem1 \n");
  scanf("%d",&c2);
  printf("enter cources taken in winter sem");
  for(i=0;i<c1;i++)
  {
   scanf("%s",wint[i]);
  }
   printf("enter cources completed in sem1");
  for(j=0;j<c2;j++)
  {
   scanf("%s",sem1[j]);
  }
  
  printf("REGISTRATION NO. IS %s \n",reg);
  printf("NAME IS %s \n",name);
  printf("12 SCHOOLNAME IS %s \n",sname);
  printf("12 PERCENTAGEIS %f \n",per);
  printf(" PHONE NO IS %s \n",no);
  printf("COURECES TAKEN IN WINTER SEMISTER ARE AS FOLLOWS:");
  for (int i1=0;i1<c1;i1++)
  {
  printf(wint[i1]);
  printf("\n");
  }
  printf("COURECES COMPLETED IN SEMISTER1 ARE AS FOLLOWS:");
 for (int j1 =0;j1<c2;j1++)
 {
  printf(sem1[j1]);
  printf("\n");
 }
  return 0;
}

You might also like