JoyMozumder

Nested if condition

Jan 19th, 2017
60
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.60 KB | None | 0 0
  1. #include<stdio.h>
  2. int main()
  3. {
  4. int a,b,c,d,e;
  5. printf("a=\nb=\nc=\nd=\ne=\n");
  6. scanf("%d%d%d%d%d",&a,&b,&c,&d,&e);
  7. if(a>b)
  8. {
  9. if(c<a)
  10. {
  11. if(d>c)
  12. {
  13. if(e>d)
  14. {
  15. printf("BANGLADESH");
  16. }
  17. else
  18. {
  19. printf("sorry....e<d");
  20. }
  21. }
  22. else
  23. {
  24. printf("sorry....d<c");
  25. }
  26. }
  27. else
  28. {
  29. printf("sorry.... c>a");
  30. }
  31. }
  32. else
  33. {
  34. printf("sorry.... a<b");
  35.  
  36. }
  37.  
  38. }
Add Comment
Please, Sign In to add comment