Advertisement
Guest User

code by Vishwas

a guest
Jan 26th, 2015
223
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.45 KB | None | 0 0
  1. /*PROGRAM to caluclate number by- Vishwas */
  2.  
  3.  
  4. #include <stdio.h>
  5. #include "stdafx.h"
  6.  
  7.  
  8. int main()
  9. {
  10. int a;
  11.  
  12.  
  13.  
  14. printf("Enter a number which you want to calculate counting of(less than 10)\n");
  15. scanf_s("%d",&a);
  16.  
  17. if ((a<=10)&&(a>=0))
  18. {
  19. printf("Congratulation,the number you entered is between 0 to 10!\n");
  20. //
  21. for(a;a>=0;a=a-1)
  22. {
  23. printf("%d\n",a);
  24. }
  25. }
  26. else
  27. {
  28. printf("Enter number between 0 to 10!\n");
  29. }
  30. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement