using C not C in visual studios 2015 write a program that De
using C (not C++) in visual studios 2015 write a program that Defines new data type “Account” & data members are id_no, balance, and rate. Your program should obtain Account information from the user. Create an Account object, initialize the object and calculate the interest on the account.
Output:
Enter account id:122655
Enter balance: 3000
Enter intrest rate: 0.1
The intrest on the account #122655 is $300.00
Solution
#include <stdio.h>
struct account {
    int id;
    int bal;
    float itrate;
 };
int main(void) {
    struct account inp;
    printf(\"Enter Account number:\");
    scanf(\"%d\",&inp.id);
    printf(\"\ Enter balance:\");
    scanf(\"%d\",&inp.bal);
    printf(\"\ Enter interest rate:\");
    scanf(\"%f\",&inp.itrate);
    float interest = inp.bal*inp.itrate;
    printf(\"\ Interest on account #%d is $%f\",inp.id,interest);
    return 0;
 }
Works for current example

