most imp structure program

4
EXPECTED PROGRAM (10 MARKS) Create a structure to specify data of customers in a bank. The data to be stored is : Account number, name of customer and balance in account. Assume maximum of 3 customers in the bank. Write a function to print the account number and name of each customer with balance below rs. 100. #include<stdio.h> #include<conio.h> struct customer { char a_no[10]; char c_name[10]; int bal; }s[5]; void display(); void main() { int i; clrscr(); for(i=1;i<=3;i++) { printf("enter the record of %d customer",i); printf("\nenter account number: "); scanf("%s",&s[i].a_no); printf("enter customer name: "); scanf("%s",&s[i].c_name); printf("enter balance: "); scanf("%d",&s[i].bal); } display(); getch(); } void display() { int i;

Upload: tribhuwan-pant

Post on 13-Nov-2015

212 views

Category:

Documents


0 download

DESCRIPTION

C language

TRANSCRIPT

EXPECTED PROGRAM (10 MARKS)Create a structure to specify data of customers in a bank. The data to be stored is : Account number, name of customer and balance in account. Assume maximum of 3 customers in the bank. Write a function to print the account number and name of each customer with balance below rs. 100.#include

#include

struct customer

{

char a_no[10];

char c_name[10];

int bal;

}s[5];

void display();

void main()

{

int i;

clrscr();

for(i=1;i