Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include "stdafx.h"
- #include <iso646.h>
- #include <iostream>
- using namespace std;
- int main()
- {
- int a;
- cin » a;
- if ( a >= 0 && a < 10) {
- cout « 1 « endl;
- }
- if ( a >= 10 && a < 100) {
- cout « 2 « endl;
- }
- if (a >= 100 && a < 1000) {
- cout « 3 « endl;
- }
- if (a >= 1000 && a < 10000) {
- cout « 4 « endl;
- }
- if (a >= 10000 && a < 100000) {
- cout « 5 « endl;
- }
- if (a >= 100000 && a < 1000000) {
- cout « 6 « endl;
- }
- if (a >= 1000000 && a < 10000000) {
- cout « 7 « endl;
- }
- if (a >= 10000000 && a < 100000000) {
- cout « 8 « endl;
- }
- if (a >= 100000000 && a < 1000000000){
- cout « 9 « endl;
- }
- if( a>= 1000000000 && a < 2000000000) {
- cout « 10 « endl;
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement