Advertisement
Guest User

Untitled

a guest
Oct 23rd, 2019
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 1.40 KB | None | 0 0
  1. #include <stdio.h>
  2.  
  3. void outputHeaders()
  4. {
  5.     printf("%11s %19s %10s %15s\n", "TRANSACTIONS", "DEPOSIT", "CHECK", "BALANCE");
  6.     printf("%11s %19s %10s %15s\n", "------------", "-------", "-----", "-------");
  7. }
  8.  
  9. int main(void) {
  10.     /*char code;
  11.     double amount, service, balance;
  12.     double amtCheck, amtDeposit, openBalance, closeBalance;
  13.     int numCheck, numDeposit;
  14.  
  15.     fopen_s(&fpIn, "account.txt", "r");
  16.     if (fpIn == NULL) {
  17.         printf("account.txt count not be opened for the input.");
  18.         exit(1);
  19.     }
  20.     fopen_s(&fpOut, "csis.txt", "w");
  21.     if (fpOut == NULL) {
  22.         printf("csis.txt count not be opened for the output.");
  23.         exit(1);
  24.     }
  25.  
  26.     amount = 0.0;
  27.     service = 0.0;
  28.     balance = 0.0;
  29.     amtCheck = 0.0;
  30.     amtDeposit = 0.0;
  31.     openBalance = 0.0;
  32.     closeBalance = 0.0;
  33.     numCheck = 0;
  34.     numDeposit = 0;
  35.     */
  36.     outputHeaders( );
  37.  
  38.     /*while (!feof(fpIn)) {
  39.         fscanf(fpIn, "%c %lf\n", &code, &amount);
  40.         printf("code: %c, amount = %8.2f\n", code, amount);
  41.         //if( code == 'I' )
  42.         //  initialBalance( amount, &balance, &service, &openBalance );
  43.         //else if( code == 'D' )
  44.         //  deposit( amount, &balance, &service, &numDeposit, &amtDeposit );
  45.         //else
  46.         //  check( amount, &balance, &service, &numCheck, &amtCheck );
  47.     }
  48.     //closeBalance = balance - service;
  49.     //outputSummary( numDeposit, amtDeposit, numCheck, amtCheck,
  50.     //openBalance, service, closeBalance );
  51.  
  52.     fclose(fpIn);
  53.     fclose(fpOut);*/
  54.     return 0;
  55. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement