Advertisement
Guest User

Untitled

a guest
Sep 19th, 2019
107
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.28 KB | None | 0 0
  1. #include<stdio.h>
  2. int main()
  3. {
  4. int a,b;
  5. a=rand()%10;
  6. b=rand()%10;
  7. if((a+b)==7 || (a+b)==11)
  8. {
  9. printf("The player wins.\n");
  10. }
  11. else
  12. {
  13. printf("the sum is:%d\nthank you!\n",(a+b));
  14. }
  15. printf("%d %d ",a,b);
  16. return 0;
  17. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement