Run Code
|
API
|
Code Wall
|
Users
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
My first structure
//gcc 5.4.0 #include <stdio.h> #include <string.h> int main(void) { typedef struct { int account_number; char account_type[20]; char account_holder_name[40]; double balance; } bank_customer; bank_customer bank_customers[5]; int n=5; bank_customers[0].account_number=1001; strcpy(bank_customers[0].account_type,"Checking"); strcpy(bank_customers[0].account_holder_name,"John Paul"); bank_customers[0].balance=2100.50; bank_customers[1].account_number=1002; strcpy(bank_customers[1].account_type,"Checking"); strcpy(bank_customers[1].account_holder_name,"GI Joe"); bank_customers[1].balance=1000; bank_customers[2].account_number=1003; strcpy(bank_customers[2].account_type,"Checking"); strcpy(bank_customers[2].account_holder_name,"GI Jane"); bank_customers[2].balance=1500; bank_customers[3].account_number=1004; strcpy(bank_customers[3].account_type,"Checking"); strcpy(bank_customers[3].account_holder_name,"Cobra Commander"); bank_customers[3].balance=4005; bank_customers[4].account_number=1005; strcpy(bank_customers[4].account_type,"Checking"); strcpy(bank_customers[4].account_holder_name,"Snake Eye"); bank_customers[4].balance=3005; for(int i=0;i<n;i++){ printf("Account Number=%d\n",bank_customers[i].account_number); } }
run
|
edit
|
history
|
help
0
Please
log in
to post a comment.
Area
Lab 9 v0.5
3468
more_than_one_break_in_loop
json formatter
SEGUNDO AVANCE DE NETFLIX
palindrome.c
Spring 2017 Lab 4 v1.1
SumIt
convertletter
Please log in to post a comment.