DataBase Program

Write a progarm to take the input of an employee and show it again.
#include


#include

void main(void)

{

struct employee

{

long int salary,phno;

int code;

char name[30],fname[30];

float height;

};

struct employee vc;

printf("Enter your name:");

gets(vc.name);

printf("Enter your father name:");

gets(vc.fname);

printf("Enter your code:");

scanf("%d",&vc.code);

printf("Enter your phone number:");

scanf("%ld",&vc.phno);

printf("Enter your salary:");

scanf("%ld",&vc.salary);

printf("Enter your height:");

scanf("%f",&vc.height);

printf("\t\t\tEmployee Data");

printf("\nName:%s\nFather Name:%s\nCode:%d\nPhone number:%ld\nSalary:%d\nHeight:%.2f",vc.name,vc.fname,vc.code,vc.phno,vc.salary,vc.height);

getch();

}

Comments

Popular posts from this blog

Tip of the Day # 13

Governor Generals of Pakistan