Guest User

Untitled

a guest
Feb 17th, 2018
106
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.88 KB | None | 0 0
  1. #include<stdio.h>
  2. #include<conio.h>
  3.  
  4. int money1(int x);
  5.  
  6. int main() {
  7.  
  8. int password, money;
  9. int x;
  10. printf_s("Welcome to our lottery game:\n Please enter your passcode:");
  11. scanf_s("%d", &password);
  12. if (password == 12345) {
  13. printf_s("Plase enter your money:");
  14. scanf_s("%d", &money);
  15. if (money > 1000) {
  16. printf_s("your money is %d\n", money);
  17. while (password > 10) {
  18. int number;
  19.  
  20. printf_s("please enter your lottery number:");
  21. scanf_s("%d", &number);
  22. if (number == 100 || number == 111 || number == 222)
  23. {
  24. printf_s("you are win in lottery:\n");
  25. printf_s("This is your money %d", money1(money));
  26. break;
  27.  
  28. }
  29. else
  30. {
  31. printf_s("You are unlucky day !\n Try Again \n");
  32. }
  33.  
  34. }
  35.  
  36. }
  37.  
  38. }
  39. else
  40. {
  41. printf_s("You must be cop:");
  42. }
  43.  
  44.  
  45. _getch();
  46. return 0;
  47. }
  48. int money1(int x) {
  49. int payback = x * 100;
  50. return payback;
  51. }
Add Comment
Please, Sign In to add comment