// STUDENT DETAILS IN C (DIFFERENT DATA TYPES)
#include<stdio.h>
void main()
{
int no;
char name[20];
float marks;
char gn;
printf("\n Enter the number");
scanf("%d",&no);
printf("\n Enter the name ");
scanf("%s", name);
printf("\n Enter the gender ");
scanf(" %c",&gn);
printf("\n Enter the marks");
scanf("%f", &marks);
printf("\t\t\t *************** STUDENT DETAILS ARE *********** \n");
printf("\n \t\t\t NUMBER IS %d", no);
printf("\n \t\t\t NAME IS %s ", name);
printf("\n \t\t\t GENDER IS %c", gn);
printf("\n \t\t\t MARKS ARE %f", marks);
}
OUTPUT:-
#include<stdio.h>
void main()
{
int no;
char name[20];
float marks;
char gn;
printf("\n Enter the number");
scanf("%d",&no);
printf("\n Enter the name ");
scanf("%s", name);
printf("\n Enter the gender ");
scanf(" %c",&gn);
printf("\n Enter the marks");
scanf("%f", &marks);
printf("\t\t\t *************** STUDENT DETAILS ARE *********** \n");
printf("\n \t\t\t NUMBER IS %d", no);
printf("\n \t\t\t NAME IS %s ", name);
printf("\n \t\t\t GENDER IS %c", gn);
printf("\n \t\t\t MARKS ARE %f", marks);
}
OUTPUT:-
No comments:
Post a Comment