number of digits in int c++
int length = 1;
int x = 234567545;
while ( x /= 10 )
length++;
number of digits in int c++
int length = 1;
int x = 234567545;
while ( x /= 10 )
length++;
how to caculation one digits integer in C++
#include <iostream>
using namespace std;
void toUpper(string &s) {
for (int i = 0; i < s.size(); i++) {
if (s[i] >= 'a' && s[i] <= 'z') {
s[i] -= 32;
}
}
}
int main() {
string s;
cin >> s;
toUpper(s);
cout << s;
return 0;
}
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us