Friday, July 30, 2021

C Program for ATM Working Principle Type2

 #include <stdio.h>

int main()

{

int pinnumber=1357,trasaction,amount;

printf(" welcome statebank atm\n");

printf("please insert your atmcard\n");

printf("enter your pinnumber\n");

scanf("%d",&pinnumber);

if(pinnumber==1357)

{

    printf("select your trasaction\n");

    scanf("%d",&trasaction);

}

else

{

    printf("wrong pinnumber\n");

    printf("collect your atmcard\n");

    printf("thank you for your visit\n");

    return 0;

}

if(trasaction>10)

{

    printf("withdraw amount\n");

    printf("enter  your amount\n");

    scanf("%d",&amount);

}

else

{

    printf("balance enquiry\n");

    printf("available balance\n");

    printf("thank you for your visit\n");

return 0;

}

if(amount<5000)

{

    printf("collect your amout\n");

    printf("collect your bill\n");

}

else

{

    printf("insufficent amount\n");

}

printf("thank you for your visit\n");

return 0;

}

C Program for Covid testing

 #include <stdio.h>

int main()

{

    int symptoms,days; 

    printf("no of symptoms:");

    scanf("%d",&symptoms);

    printf("no of days:");

    scanf("%d",&days);

    if(symptoms==4 && days==7)

{

    printf("covid positive");

}

else if(symptoms>3 && days>3)

{

    printf("normal feve\n covid negative");

}

else

{

    printf("normalcold\n covid negative");

}

    return 0;

}


C Program for multi symptoms using string comparison

 


#include <stdio.h>

int main()

{

    char syma[10];

    char symb[20];

    char symc[30];

    char symd[40];

    int covid,covid1,covid2,covid3;

    printf("enter your symptoms:\n");

    scanf("%s%s%s%s",syma,symb,symc,symd);

    covid=strcmp(syma,"headache");

    covid1=strcmp(symb,"cold");

    covid2=strcmp(symc,"cough");

    covid3=strcmp(symd,"fever");

    if(covid==0)

    {

        printf("covid positive\n");

    }

else

{

    printf("covid negative\n");

}

if(covid1==0)

{

    printf("covid positive\n");

}

else

{

    printf("covid negative\n");

}

if(covid2==0)

{

    printf("covid positive\n");

}

else

{

    ("covid negative\n");

}

if(covid3==0)

{

    printf("covid positive\n");

}

else

{

    printf("covid negative\n");

}

    return 0;

}



C Program for Bus Arrival Departure Status

 #include <stdio.h>

int main()

{

    printf("no of bus departed:\n");

    for(int i=1;i<5;i=i+1)

    {

        printf("enter no of bus:%d\n",i);

    }

printf("no of bus arrived:\n");

for(int i=1;i<5;i=i+1)

{

    printf("enter no of bus:%d\n",i);

}

return 0;

}


C Programming for loan eligibility form & EMI Calculation

 #include <stdio.h>

int main ()

{

  char n[30];

  char l[100];

  char j[50];

  char p[100];

  int age, salary, expense, loanamt, Time, c, i, lm,emi;

  printf("HDFC\n");

  printf("Loan elegbility form\n");

  printf("Name: ");

  scanf("%s",n);

  printf("Age: ");

  scanf ("%d",&age);

  printf("Job:");

  scanf("%s",j);

  printf("Monthly Income:");

  scanf("%d",&salary);

  printf("Monthly Expense:");

  scanf("%d",&expense);

  printf("purpose of loan:");

  scanf("%s",p);

  c = salary - expense;

  printf ("Savings:%d\n", c);

  if (salary<40000)

    {

      lm = c * 50;

      printf("Eligible loan amount:%d\n",lm);

    }

  else

    {

      lm = c*25;

      printf("Eligible loan amount:%d\n",lm);

    }

    printf("Time taken to complete in months:");

    scanf("%d", &Time);

    printf("your loan completion time in months is :%d\n",Time);

  if(Time>61)

    {

      printf(" Sorry loan NOT AvAILABLE more than 60 months\n");

    }

  else

    {

      printf("Rate of intest is 12%\n");

      i=c*12/100;

      printf("your rate of intest per month is %d\n", i);

      emi= lm*12/100*(1 + 12/100)^Time/((1 + 12/100)^Time - 1);

      printf("Your EMI amount is monthly %d/- only\n",emi);

      printf("Would you like to proceed:)\n");

      printf("Tap to continue");

    }

  

  

  return 0;

}


C Programming for Covaccine center

 #include <stdio.h>

int main()

{

    char n[30];

    char b[30];

    int i,vi,age,dosage;

    printf("Madukkur covaccine centre\n");

    for( i=10102;i<=10103;i=i+1)

    {

     printf("enter your name:");

     scanf("%s",&n);

     printf("enter your voter id no:");

     scanf("%d",&vi);

     printf("enter your age:");

     scanf("%d",&age);

     printf("enter your blood group:");

     scanf("%s",&b);

     printf("enter your no of dosage:");

     scanf("%d",&dosage);

     if(dosage=1)

     {

     printf("vaccination completed\n");

     printf("August 6th is your next dosage day\n");

     }

     else

     {

        printf("vaccination completed\n");

     }

    }

    printf("Aalathur covaccine centre\n");

    for( i=10100;i<=10101;i=i+1)

    {

     printf("enter your name:");

     scanf("%s",&n);

     printf("enter your voter id no:");

     scanf("%d",&vi);

     printf("enter your age:");

     scanf("%d",&age);

     printf("enter your blood group:");

     scanf("%s",&b);

     printf("enter your no of dosage:");

     scanf("%d",&dosage);

     if(dosage=1)

     {

     printf("vaccination completed\n");

     printf("August 6th is your next dosage day\n");

     }

     else

     {

        printf("vaccination completed\n");

     }

    }

    printf("Aalamballam covaccine centre\n");

    for( i=10100;i<=10101;i=i+1)

    {

     printf("enter your name:");

     scanf("%s",&n);

     printf("enter your voter id no:");

     scanf("%d",&vi);

     printf("enter your age:");

     scanf("%d",&age);

     printf("enter your blood group:");

     scanf("%s",&b);

     printf("enter your no of dosage:");

     scanf("%d",&dosage);

     if(dosage=1)

     {

     printf("vaccination completed\n");

     printf("August 6th is your next dosage day\n");

     }

     else

     {

        printf("vaccination completed\n");

     }

    }

    printf("Vikramam covaccine centre\n");

    for( i=101010;i<=101011;i=i+1)

    {

     printf("enter your name:");

     scanf("%s",&n);

     printf("enter your voter id no:");

     scanf("%d",&vi);

     printf("enter your age:");

     scanf("%d",&age);

     printf("enter your blood group:");

     scanf("%s",&b);

     printf("enter your no of dosage:");

     scanf("%d",&dosage);

     if(dosage=1)

     {

     printf("vaccination completed\n");

     printf("August 6th is your next dosage day\n");

     }

     else

     {

        printf("vaccination completed\n");

     }

    }

    printf("Athivetti covaccine centre\n");

    for( i=10000;i<=10001;i=i+1)

    {

     printf("enter your name:");

     scanf("%s",&n);

     printf("enter your voter id no:");

     scanf("%d",&vi);

     printf("enter your age:");

     scanf("%d",&age);

     printf("enter your blood group:");

     scanf("%s",&b);

     printf("enter your no of dosage:");

     scanf("%d",&dosage);

     if(dosage=1)

     {

     printf("vaccination completed\n");

     printf("August 6th is your next dosage day\n");

     }

     else

     {

        printf("vaccination completed\n");

     }

    }

    printf("Sivakollai covaccine centre\n");

    for( i=1001;i<=1002;i=i+1)

    {

     printf("enter your name:");

     scanf("%s",&n);

     printf("enter your voter id no:");

     scanf("%d",&vi);

     printf("enter your age:");

     scanf("%d",&age);

     printf("enter your blood group:");

     scanf("%s",&b);

     printf("enter your no of dosage:");

     scanf("%d",&dosage);

     if(dosage=1)

     {

     printf("vaccination completed\n");

     printf("August 6th is your next dosage day\n");

     }

     else

     {

        printf("vaccination completed\n");

     }

    }

    return 0;

}




























C Program for ATM Working principle

 #include <stdio.h>

int main()

{

int pinnumber,amount;

printf("Welcome to ATM\n");

printf("Please insert your card\n");

printf("Enter your pinnumber: ");

scanf("%d",&pinnumber);

if(pinnumber==2907)

{

    printf("Enter your amount : ");

    scanf("%d",&amount);

}

else

{

    printf("Incorrect pin\n");

    printf("Transaction Failed\n");

    printf("Take your card\n");

    printf("Thank you for visiting\n");

    return 0;

}

if(amount>2000)

{

    printf("Collect your amount\n");

    printf("Take your card\n");

    printf("Transaction completed\n");

    printf("Thank you for visiting\n");

}

else

{

    printf("Insufficient fund\n");

    printf("Take your card\n");

    printf("Transaction failed\n");

    printf("Thank you for visiting\n");

}

    return 0;

}


USD TO INR C++ PROGRAMMING

  NALLAMUTHU GOUNDER MAHALINGAM COLLEGE                                                 POLLACHI-642001                                     ...