Ahnaf123

BLOOD GROUP

Dec 23rd, 2018
444
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.41 KB | None | 0 0
  1. #include<stdio.h>
  2. int main()
  3. {
  4. char blood;
  5. printf("blood group=");
  6. scanf(" %c",&blood);
  7. if(blood=='A'||blood=='B'||blood=='C'||blood=='O')
  8. {
  9. char B;
  10. printf("Is it Negative or Positive");
  11. scanf(" %c",&B);
  12. if(B=='+')
  13. {
  14. printf("%c is positive",blood);
  15.  
  16. }
  17. else if(B=='-')
  18. {
  19. printf("%c is negative",blood);
  20.  
  21. }
  22. else
  23. {
  24. printf("beshi pakna");
  25. }
  26. }
  27. else
  28. {
  29. printf("danger,run!");
  30. }
  31. return 0;
  32. }
Advertisement
Add Comment
Please, Sign In to add comment