Problem 18: Bank Account

You are going to open a bank account . If your age is greater than 18 then you can open an account. Get your age by input and print “Yes” if you can open an account otherwise print “No”.

2,187 total views, 2 views today

Comments

comments

4 thoughts on “Problem 18: Bank Account”

  1. #include
    int main()
    {
    int i;
    printf(“Enter your age\n”);
    scanf(“%d”,&i);
    if(i<=18)
    printf("you can't open Bank account\n");
    else
    printf("You can open Bank account\n");
    return 0;
    }

  2. #include
    int main()
    {
    int age;
    printf(“____________________Welcome to open an bank account_______________________________”);
    printf(“\n”);
    printf(“\n”);
    printf(“Please Enter your age\n”);
    scanf(“%d”,&age);
    if(age!=18){
    printf(“Sorry you cannot open an account\n”);
    }
    else{
    printf(“yes you can open an account”);
    }
    }

  3. #include
    int main()
    {
    int age;
    printf(“____________________Welcome to open an bank account_______________________________”);
    printf(“\n”);
    printf(“\n”);
    printf(“Please Enter your age\n”);
    scanf(“%d”,&age);
    if(age<=18){
    printf("Sorry you cannot open an account\n");
    }
    else{
    printf("yes you can open an account");
    }
    }

  4. #include
    int main()
    {
    int Age;
    printf(“Pls Enter your Age:”);
    scanf(“%d”,&Age);
    if(Age>=18){
    printf(“YOU CAN OPEN A ACCOUNT”);
    }else{
    printf(“YOU CAN’T OPEN A ACCOUNT”);
    }
    return 0;
    }

Leave a Reply

Your email address will not be published.