Advertisement
Guest User

Untitled

a guest
Sep 26th, 2016
65
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.77 KB | None | 0 0
  1. #include <stdio.h>
  2.  
  3. int main()
  4. {
  5. int a, i, z;
  6. unsigned int b;
  7. short int c;
  8. unsigned short int d;
  9. long int e;
  10. unsigned long int f;
  11. scanf("%d %u %hd %hu %ld %lu", &a, &b, &c, &d, &e, &f);
  12. z = 1;
  13. for (i=1; i<=a; i++)
  14. {
  15. z = z*i;
  16. }
  17. printf("%d\n", z);
  18. z = 1;
  19. for (i=1; i<=b; i++)
  20. {
  21. z = z*i;
  22. }
  23. printf("%u\n", z);
  24. z = 1;
  25. for (i=1; i<=c; i++)
  26. {
  27. z = z*i;
  28. }
  29. printf("%hd\n", z);
  30. z = 1;
  31. for (i=1; i<=d; i++)
  32. {
  33. z = z*i;
  34. }
  35. printf("%hu\n", z);
  36. z = 1;
  37. for (i=1; i<=e; i++)
  38. {
  39. z = z*i;
  40. }
  41. printf("%ld\n", z);
  42. z = 1;
  43. for (i=1; i<=f; i++)
  44. {
  45. z = z*i;
  46. }
  47. printf("%lu\n", z);
  48. return 0;
  49. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement