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

Can I have some C code for this exercise? just a part that can help me to start

ID: 3809454 • Letter: C

Question

Can I have some C code for this exercise? just a part that can help me to start this (or help me solve this), please!

The credit card fraud detection features uses user behavior and location scanning to check for unusual patterns. These patterns include user characteristics such as user spending patterns as well as usual user geographic locations to verify his identity. If any unusual pattern is detected, the system requires re-verification The system analyses user credit card data for various characteristics. These characteristics include user country, usual spending procedures. Based upon previous data of that user the system recognizes unusual patterns in the payment procedure. So now the system may require the user to login again or even block the user for more than 3 invalid attempts Core Features: The system stores previous transaction patterns for each user Based upon the user spending ability and even country, it calculates user's characteristics More than 20-30 deviation of user transactions spending history and operating country is considered as an invalid attempt and system takes action.

Explanation / Answer

#include<stdio.h>
#include<stdlib.h>
int balance,i=-1;
int withdraw(int arr[],int bal,int amt)/*for Withdrawal*/
{
   i=i+1;
   int j,no,flag=0;
   if(i==0)
   {
       bal=bal-amt;
       printf("Amount Succesfully Withdrawal. New Account Balance Is:%d",bal);
       arr[i]=amt;
   }
   else
   {
       for(j=0;j<=i;j++)
       {          
           if(arr[j]*1.30<=amt||arr[j]*0.70>=amt)
           {
               printf("");
           }
           else
           {
               bal=bal-amt;
               printf(" Amount Succesfully Withdrawal. New Account Balance Is:%d",bal);
               flag=1;
               break;
           }
       }
   }
   if(0==flag)
   {
       printf(" Daviation is More Than 30 Percent. Amount Can't be Withdrawal.");
   }
   return bal;

}
int credit(int bal,int amt)/*for credit*/
{
   bal=bal+amt;
   printf("Amount Succesfully Credited. New Account Balance Is:%d",bal);
   return bal;
}

int main(void)
{
   long int account;
   static int balance;
   int ch,amt;
   char country[20],name[30],c;
   int arr[100];
   printf(" ENTER THE ACCOUNT NUMBER:");
   scanf("%ld",&account);
   printf(" ENTER THE CUSTOMER NAME:");
   scanf("%s",name);
   printf(" ENTER THE COUNTRY:");
   scanf("%s",country);
   printf(" ENTER THE STARTING ACCOUNT BALANCE:");
   scanf("%d",&balance);
   do
   {
   printf(" CREDIT CARD SYSTEM 1.CREDIT 2.WITHDRAW 3.CHECK BALANCE 4.EXIT");
   scanf("%d",&ch);
   switch(ch)
   {
       case 1:
           printf(" Enter Amount to Be CREDITED:");
           scanf("%d",&amt);
           if(amt<1)
           {
               printf("INVALID AMOUNT");
           }
           else
           {
               balance=credit(balance,amt);
           }
           break;
       case 2:
           printf(" Enter Amount to WITHDRAW:");
           scanf("%d",&amt);
           if(amt>balance||amt<1)
           {
               printf(" INVALID AMOUNT OR LIMIT EXCEEDED.");
           }
           else
           {
               balance=withdraw(arr,balance,amt);
           }
           break;
       case 3:
           printf("ACCOUNT BALNACE IS:%d",balance);
           break;
       case 4:
           exit(0);
           default:
           exit(0);
       }
       printf(" Do U Want to Continue(1 or 0):");
       scanf("%d",&ch);
   }while(ch==1);/*end of while*/
  
  
   return 1;
}/*end of main*/

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote