write an algorithm IN C to print the count of debit transactions THAT WERE MADE IMMEDIATELY AFTER A CREDIT TRANSACTION FOR THAT PARTICULAR CUSTOMER
Answers
Answered by
1
Answer:
This is a answer
Explanation:
This is helpful for you
Attachments:
Answered by
0
From the given question the algorithm in C is :
Input
The first line of the input consists of a string userString, representing the string of transaction IDs.
Output
Print an integer representing the count of debit transactions made immediately after a credit transaction.
#include <iostream>
using namespace std;
int main()
{
int c;
cout<<"\nChoose type of transaction:\n1. Credit \n2. Debit\n";
cin>>c;
char id_c;
char id_d;
int count=1;
if (c==1){
id_c='a';
count=1;
}
else if(c==2){
id_d='b';
}
cout<<count;
return 0;
}
Similar questions