#include<stdio.h>
#include <string.h>
int main()
{
char creditID[10];
char debitID[10];
//char s[20];
int s;
printf("Enter credit transaction id: ");
fgets(creditID, 10, stdin);
printf("Enter debit transaction id: ");
fgets(debitID, 10, stdin);
printf("Enter the number of transactions to perform:");
scanf("%d",&s);
printf("Concatenated string:%s",strcat(creditID,debitID));
for(int i = 0; i < s; i++) {
if(s != ' ')
printf("") ;
}
printf("Count= %d",s);
}
Comments
Leave a comment