Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<stdio.h>
- #include<conio.h>
- int money1(int x);
- int main() {
- int password, money;
- int x;
- printf_s("Welcome to our lottery game:\n Please enter your passcode:");
- scanf_s("%d", &password);
- if (password == 12345) {
- printf_s("Plase enter your money:");
- scanf_s("%d", &money);
- if (money > 1000) {
- printf_s("your money is %d\n", money);
- while (password > 10) {
- int number;
- printf_s("please enter your lottery number:");
- scanf_s("%d", &number);
- if (number == 100 || number == 111 || number == 222)
- {
- printf_s("you are win in lottery:\n");
- printf_s("This is your money %d", money1(money));
- break;
- }
- else
- {
- printf_s("You are unlucky day !\n Try Again \n");
- }
- }
- }
- }
- else
- {
- printf_s("You must be cop:");
- }
- _getch();
- return 0;
- }
- int money1(int x) {
- int payback = x * 100;
- return payback;
- }
Add Comment
Please, Sign In to add comment