Coder Social home page Coder Social logo

c's People

Contributors

misakar avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

c's Issues

#include <stdio.h>

#include <stdio.h>
#include <string.h>

int accountNumber, password;
char accountHolderName[] = "Zafarullah";
double currentBalance = 5000.00;

// function prototypes
void deposit();
void withdraw();
void balanceInquiry();
void easyload();
void billPayments();
void easypaisaLoans();
void bankTransfers();

int main() {
int open;
int* openPtr = &open;

printf("\033[0;31mPress 786 to continue: ");
scanf("%d", openPtr);

if (*openPtr != 786) {
    printf("\033[0;31mInvalid input! Please try again.\n");
    return 0;
}

printf("\033[0;32mWelcome to Easypaisa App!\033[0m\n");

printf("\033[0;33mPlease enter your account number: \033[0m");
scanf("%d", &accountNumber);

if (accountNumber == 12345) {
    printf("\033[44mPlease enter password: \033[0m");
    scanf("%d", &password);

    if (password == 54321) {
        printf("\nAccount Holder Name: %s\n", accountHolderName);
        printf("Current Balance: %0.2lf PKR\n", currentBalance);
    } else {
        printf("\033[0;31mInvalid password entered!\n");
        return 0;
    }
} else {
    printf("\n\033[0;31mInvalid account number entered! Please try again.\n");
    return 0;
}

while (1) {
    int transactionType;
    int* transactionTypePtr = &transactionType;

    printf("\n\033[0;35mPlease select a Transaction Type:\n");
    printf("1. Deposit\n2. Withdraw\n3. Balance Inquiry\n4. Easyload\n5. Bill Payments\n6. Easypaisa Loans\n7. Bank Transfers\n8. Exit\n");
    scanf("%d", transactionTypePtr);

    switch (*transactionTypePtr) {
        case 1:
            deposit();
            break;
        case 2:
            withdraw();
            break;
        case 3:
            balanceInquiry();
            break;
        case 4:
            easyload();
            break;
        case 5:
            billPayments();
            break;
        case 6:
            easypaisaLoans();
            break;
        case 7:
            bankTransfers();
            break;
        case 8:
            printf("Exiting program...\n");
            return 0;
        default:
            printf("\033[0;31mInvalid transaction type selected!\n");
            break;
    }
}

return 0;

}

void deposit() {
int depositAmount;
int* depositAmountPtr = &depositAmount;

printf("\nEnter deposit amount: ");
scanf("%d", depositAmountPtr);

if (*depositAmountPtr <= 0) {
    printf("\033[0;31mInvalid deposit amount entered!\n");
    return;
}

currentBalance += *depositAmountPtr;
printf("Deposit successful! Current Balance: %0.2lf PKR\n", currentBalance);

}

void withdraw() {
int withdrawAmount;
int* withdrawAmountPtr = &withdrawAmount;

printf("\nEnter withdraw amount: ");
scanf("%d", withdrawAmountPtr);

if (*withdrawAmountPtr <= 0) {
    printf("\033[0;31mInvalid withdraw amount entered!\n");
return;

}

if (*withdrawAmountPtr > currentBalance) {
printf("\033[0;31mInsufficient balance!\n");
return;
}

currentBalance -= *withdrawAmountPtr;
printf("Withdrawal successful! Current Balance: %0.2lf PKR\n", currentBalance);
}

void balanceInquiry() {
printf("\nAccount Holder Name: %s\n", accountHolderName);
printf("Current Balance: %0.2lf PKR\n", currentBalance);
}

void easyload() {
int phoneNum;
int* phoneNumPtr = &phoneNum;

printf("\nEnter phone number: ");
scanf("%d", phoneNumPtr);

int loadAmount;
int* loadAmountPtr = &loadAmount;

printf("Enter load amount: ");
scanf("%d", loadAmountPtr);

if (*loadAmountPtr <= 0) {
    printf("\033[0;31mInvalid load amount entered!\n");
    return;
}

if (*loadAmountPtr > currentBalance) {
    printf("\033[0;31mInsufficient balance!\n");
    return;
}

currentBalance -= *loadAmountPtr;
printf("Load successful! Current Balance: %0.2lf PKR\n", currentBalance);

}

void billPayments() {
int billAmount;
int* billAmountPtr = &billAmount;

printf("\nEnter bill amount: ");
scanf("%d", billAmountPtr);

if (*billAmountPtr <= 0) {
    printf("\033[0;31mInvalid bill amount entered!\n");
    return;
}

char billType[20];
printf("Enter bill type: ");
scanf("%s", billType);

if (strcmp(billType, "Electricity") == 0) {
    // perform electricity bill payment
} else if (strcmp(billType, "Gas") == 0) {
    // perform gas bill payment
} else if (strcmp(billType, "Water") == 0) {
    // perform water bill payment
} else {
    printf("\033[0;31mInvalid bill type entered!\n");
    return;
}

if (*billAmountPtr > currentBalance) {
    printf("\033[0;31mInsufficient balance!\n");
    return;
}

currentBalance -= *billAmountPtr;
printf("Bill payment successful! Current Balance: %0.2lf PKR\n", currentBalance );

}

void easypaisaLoans() {
int loanAmount;
int* loanAmountPtr = &loanAmount;

printf("\nEnter loan amount: ");
scanf("%d", loanAmountPtr);

if (*loanAmountPtr <= 0) {
    printf("\033[0;31mInvalid loan amount entered!\n");
    return;
}

int loanDuration;
int* loanDurationPtr = &loanDuration;

printf("Enter loan duration in months (3, 6, or 12): ");
scanf("%d", loanDurationPtr);

if (*loanDurationPtr != 3 && *loanDurationPtr != 6 && *loanDurationPtr != 12) {
    printf("\033[0;31mInvalid loan duration entered! Duration should be 3, 6, or 12 months.\n");
    return;
}

double interestRate;
if (*loanDurationPtr == 3) {
    interestRate = 0.05;
} else if (*loanDurationPtr == 6) {
    interestRate = 0.07;
} else {
    interestRate = 0.1;
}

double totalLoan = *loanAmountPtr + (*loanAmountPtr * interestRate);

if (totalLoan > currentBalance) {
    printf("\033[0;31mInsufficient balance to process loan request!\n");
    return;
}

currentBalance += totalLoan;
printf("Loan approved! Your total loan amount is: %0.2lf PKR\n", totalLoan);
printf("Current Balance: %0.2lf PKR\n", currentBalance);

}

void bankTransfers() {
char bankName[50], bankAccount[50];
double transferAmount;

printf("\nEnter Bank Name: ");
scanf("%s", bankName);

printf("Enter Bank Account Number: ");
scanf("%s", bankAccount);

printf("Enter Transfer Amount: ");
scanf("%lf", &transferAmount);

if (transferAmount <= 0) {
    printf("\033[0;31mInvalid transfer amount entered!\n");
    return;
}

if (transferAmount > currentBalance) {
    printf("\033[0;31mInsufficient balance!\n");
    return;
}

currentBalance -= transferAmount;
printf("\nTransfer Successful! Current Balance: %0.2lf PKR\n", currentBalance);

}

Power

include <math.h>

include <stdio.h>

int main( )
{
float a ;
a = pow ( 5.0, 2.0 ) ;
printf ( "%f", a ) ;
}

Disha Early Access #1

<!DOCTYPE html> <html> <head> <H1>Confused about your ideal stream?</h1> <Label>follow the following steps and you'll have a surerity atleast.>_<</label> <style> .button { background-color: #4CAF50; /* Green */ border: none; color: white; padding: 15px 32px; text-align: center; text-decoration: none; display: inline-block; font-size: 10px; } </style> </head> <body> <form> <H2>#You're most interesting in?</h2> <select class="country"> <option value="1">Space and science</option> <option value="2">Arts and designing</option> <option value="3">Business and trade</option> </select> </form> <H2><l>#Choose the one in your're best! <!DOCTYPE html> <html> <body> <form> <input type="radio" name="topic" value="acting"> Acting and Modelling<br> <input type="radio" name="topic" value="sports"> Different Sports Equipments<br> <input type="radio" name="topic" value="maths"> Numbers<br> <input type="radio" name="topic" value="programming"> A Man Programming<br> <input type="radio" name="topic" value="technology"> Smart Technology and Its Applications<br> <input type="radio" name="topic" value="machine-learning"> Girl in a Jacket Machine Learning and Artificial Intelligence (AI)<br> <input type="radio" name="topic" value="music"> Headphones on a Laptop Music<br> <input type="radio" name="topic" value="politics"> US Building Politics<br> <input type="radio" name="topic" value="psychology"> Human Brain Psychology and Human Behaviour<br> <input type="radio" name="topic" value="gk"> Growth While Learning GK and Current Affairs<br> <input type="radio" name="topic" value="stock-market"> Stock Prices Stock Market<br> <input type="radio" name="topic" value="accounting"> Accounting Data Analysis and Equations<br> <br> </form> </html> </div><br><br><br><br> <style> button { font-size: 36px; padding: 20px 40px; } </style> <body> <!DOCTYPE html> <html> <body> <button onclick="window.location.href = 'http//disha.ml/95-2/'">Check Now</button> </body> </html> <Div> <Caption> "Never loose hope, because there are people who are inspired by you!". -kunal</Caption> </Div> </body> </html>

Privacy Policy

Kritik Technologies built the K Dictionary app as a Free app. This SERVICE is provided by Kritik Technologies at no cost and is intended for use as is.

This page is used to inform visitors regarding our policies with the collection, use, and disclosure of Personal Information if anyone decided to use our Service.

If you choose to use our Service, then you agree to the collection and use of information in relation to this policy. The Personal Information that we collect is used for providing and improving the Service. We will not use or share your information with anyone except as described in this Privacy Policy.

The terms used in this Privacy Policy have the same meanings as in our Terms and Conditions, which are accessible at K Dictionary unless otherwise defined in this Privacy Policy.

Information Collection and Use

For a better experience, while using our Service, we may require you to provide us with certain personally identifiable information, including but not limited to Kunal Verma. The information that we request will be retained by us and used as described in this privacy policy.

The app does use third-party services that may collect information used to identify you.

Link to the privacy policy of third-party service providers used by the app

Google Play Services
Log Data

We want to inform you that whenever you use our Service, in a case of an error in the app we collect data and information (through third-party products) on your phone called Log Data. This Log Data may include information such as your device Internet Protocol (“IP”) address, device name, operating system version, the configuration of the app when utilizing our Service, the time and date of your use of the Service, and other statistics.

Cookies

Cookies are files with a small amount of data that are commonly used as anonymous unique identifiers. These are sent to your browser from the websites that you visit and are stored on your device's internal memory.

This Service does not use these “cookies” explicitly. However, the app may use third-party code and libraries that use “cookies” to collect information and improve their services. You have the option to either accept or refuse these cookies and know when a cookie is being sent to your device. If you choose to refuse our cookies, you may not be able to use some portions of this Service.

Service Providers

We may employ third-party companies and individuals due to the following reasons:

To facilitate our Service;
To provide the Service on our behalf;
To perform Service-related services; or
To assist us in analyzing how our Service is used.
We want to inform users of this Service that these third parties have access to their Personal Information. The reason is to perform the tasks assigned to them on our behalf. However, they are obligated not to disclose or use the information for any other purpose.

Security

We value your trust in providing us your Personal Information, thus we are striving to use commercially acceptable means of protecting it. But remember that no method of transmission over the internet, or method of electronic storage is 100% secure and reliable, and we cannot guarantee its absolute security.

Links to Other Sites

This Service may contain links to other sites. If you click on a third-party link, you will be directed to that site. Note that these external sites are not operated by us. Therefore, we strongly advise you to review the Privacy Policy of these websites. We have no control over and assume no responsibility for the content, privacy policies, or practices of any third-party sites or services.

Children’s Privacy

These Services do not address anyone under the age of 13. We do not knowingly collect personally identifiable information from children under 13 years of age. In the case we discover that a child under 13 has provided us with personal information, we immediately delete this from our servers. If you are a parent or guardian and you are aware that your child has provided us with personal information, please contact us so that we will be able to do the necessary actions.

Changes to This Privacy Policy

We may update our Privacy Policy from time to time. Thus, you are advised to review this page periodically for any changes. We will notify you of any changes by posting the new Privacy Policy on this page.

This policy is effective as of 2022-11-26

Contact Us

If you have any questions or suggestions about our Privacy Policy, do not hesitate to contact us at [email protected].

Thanks a lot for using our app!:)

Power

include <math.h>

include <stdio.h>

int main( )
{
float a ;
a = pow ( 5.0, 2.0 ) ;
printf ( "%f", a ) ;
}

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.