Hi, I need some C programming help. I am using Visual Studio. Mymain problem is how to get user impu

Hi, I need some C programming help. I am using Visual Studio. Mymain problem is how to get user imput for a struct. Theinstructions are at the the top. Here is what I have: /*Write a program that creates a structure template with thefollowing data fields.
The program should then prompt the user to enter the data topopulate the structure.
Finally, use printf( ) to display the information entered by theuser. Account number
Account owner street address (string)
Account owner city/state (string)
Account owner zip code
Account balances
Account credit limit
Account name*/ #include
#include
#define MAX 100 struct account {//declare struct
   int num;
   char st_addr[MAX];
   char city_state[MAX];
   int zip;
   double balances;
   int cred_lim;
   char name;
}; int main()
{
   struct account info;// declare info as accountvariable    printf(“Enter account number:”);
   scanf(“%dn”, &info.num);    printf(“Enter account owner streetaddress:”);
   gets(info.st_addr);    printf(“Enter account owner city andstate:”);
   gets(info.city_state);    printf(“Enter account owner zip code:”);
   scanf(“%d”, &info.zip);    printf(“Enter account balances:”);
   scanf(“%lf”, &info.balances);    printf(“Enter account credit limit:”);
   scanf(“%d”, &info.cred_lim);    printf(“Enter account name:”);
   scanf(“%s”, &info.name);
   //finished getting info
  
   //gives info back
   printf(“Account number: %dn”, info.num);
   printf(“Account owner street address: %sn”,info.st_addr[MAX]);
   printf(“Account owner city / state: %sn”,info.city_state[MAX]);
   printf(“Account owner zip code: %dn”,info.zip);
   printf(“Account balances: %dn”, info.balances);
   printf(“Account credit limit: %dn”,info.cred_lim);
   printf(“Account name: %sn”, info.name);    return 0;
} Thank you! Attached

 

Looking for a Similar Assignment? Let us take care of your classwork while you enjoy your free time! All papers are written from scratch and are 100% Original. Try us today! Use Code SAVE15 for 15% discount