Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

que le Mozambique le Zaire le Zimbabwe rite a program that reads the French name

ID: 3667336 • Letter: Q

Question

que le Mozambique le Zaire le Zimbabwe rite a program that reads the French name of a country and adds the article: le for masculine or la for feminine, such as le Canada or la Belgique However, if the country name starts with a vowel, use l'; for example, l'Afghanistan. For the following plural country names, use les les Etats-Unis. les Pays-Bas .30 Write a program to simulate a bank transaction. There are two bank accounts: check ing and savings. First, ask for the initial balances of the bank accounts; reject nega- tive balances. Then ask for the transactions; options are and transfer. Then ask for the account; options are checking and savings. Then ask for th amount; reject transactions that overdraw an account. At the end, print the balance of both accounts. 31 Write a program that reads in the name and salary of an employee. Here the salary will denote an hourly wage, such as $9.25. Then ask how many hours the em worked in the past week. Be sure to accept fractional hour Compute the pay. Any overtime work (over 40 hours per week) is paid at 150 percent of the regular wag Print a paycheck for the employee When you use an automated teller ma e (ATM) with your ba card, you need to use a personal identification number (PIN) to access your account

Explanation / Answer

#include<iostream.h>
#include<conio.h>
#include<string.h>

void main()
{
   char acc_type[10], trans[10];

   double int_bal_c, int_bal_s, amt, cur_balc, cur_bals;

   while(1)
   {
       cout<<"Enter Initial Balance for Checking a/c";
       cin>>int_bal_c;

       if(int_bal_c>0)
           break;
   }
   cur_balc=int_bal_c;
   while(1)

   {
       cout<<"Enter Initial Balance for Saving a/c";
       cin>>int_bal_s;

       if(int_bal_s>0)
           break;
   }
   cur_bals=int_bal_s;

   cout<<"Enter Transaction Option [Deposit / Withdrawal]";
   cin>>trans;

   cout<<"Enter Account Type for transaction [Checking / Saving]";
   cin>>acc_type;

   while(1)
   {
       cout<<"Enter Transaction Amount";
       cin>>amt;

       if(amt>0)
           break;
   }

  
   if(strcmp(acc_type,"Checking") ==0 && strcmp

(trans,"Deposit")==0)
       cur_balc=int_bal_c+amt;

   if(strcmp(acc_type,"Checking") ==0 && strcmp

(trans,"Withdrawal")==0)
       cur_balc=int_bal_c-amt;

   if(strcmp(acc_type,"Saving") ==0 && strcmp

(trans,"Deposit")==0)
       cur_bals=int_bal_s+amt;

   if(strcmp(acc_type,"Saving") ==0 && strcmp

(trans,"Withdrawal")==0)
       cur_bals=int_bal_s-amt;

   cout<<"Current Balance Checking A/c" <<cur_balc<<endl;
   cout<<"Current Balance Checking A/c" <<cur_bals;
   getch();
}