eolymp
bolt
Try our new interface for solving problems
Problems

The first digit of the number

published at 4/8/24, 11:37:52 am

include <iostream>

include <cmath>

using namespace std; int main() {

long long n,i; cin>>n; n=abs(n); while(n>0){ i=n%10; n=n/10;} cout<<i;

}

published at 4/12/24, 3:17:55 pm

include <iostream>

include <cmath>

using namespace std; int main() { long long n,i; cin>>n; n=abs(n); while(n>0) { i=n%10; n=n/10; } cout<<i; }