Write a program to print the count of debit transactions that are made immediately after a credit transactions for that particular customer in C
Answers
Answered by
0
Answer:
The answer to the given question is:
a program to print the count of debit transactions that are made immediately after a credit transaction for that particular customer in C:
class Main (object):
main():
count = 0
print ("Enter transaction id ")
Credit = int (input())
print ("Enter debit transaction id:") :")
Debit Id = int (input())
s = creditID + debitID
print(s)
i = 0
while i < len(s):
if s[i]! = '':
count +=1
i +=1
print ("Count=" + count)
main()
Explanation:
The algorithm in C in this question is:
Input:
The first input line consists of a Credit representing the transaction ID string.
Output:
Print an integer representing the number of debit transactions made immediately after the credit transaction.
#SPJ3
Similar questions