Advertisement
nguyenhappy92

Hãy đếm số lượng chữ số của số nguyên dương n

Oct 6th, 2015
174
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.23 KB | None | 0 0
  1. // Hay dem so luong chu so cua n nguyen duong n
  2. // Khai bao thu vien
  3.  
  4. #include<stdio.h>
  5. #include<conio.h>
  6.  
  7. void main()
  8. {
  9. int n;
  10. scanf("%d",&n);
  11. int dem=0;
  12. for(int i=0;i<=n;i++)
  13. {
  14. dem++;
  15. }
  16. printf("%d",dem);
  17. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement