#include<stdio.h>
struct account
{
char name[100];
int balance;
}ac;
void get(struct account *a)
{
printf("Enter Name : ");
fflush(stdin);
scanf("%s",&a->name);
printf("\nEnter Account Balance : ");
scanf("%d",&a->balance);
}
void print(struct account *b)
{
printf("Name : %s",b->name);
printf("\nBalance : %d",b->balance);
}
int main()
{
get(&ac);
print(&ac);
}
struct account
{
char name[100];
int balance;
}ac;
void get(struct account *a)
{
printf("Enter Name : ");
fflush(stdin);
scanf("%s",&a->name);
printf("\nEnter Account Balance : ");
scanf("%d",&a->balance);
}
void print(struct account *b)
{
printf("Name : %s",b->name);
printf("\nBalance : %d",b->balance);
}
int main()
{
get(&ac);
print(&ac);
}
No comments:
Post a Comment