Untitled

Anonymous
Plain Text
11/19/2022 7:02 PM
296 B
18
Indexable
Never

#include <iostream>
#include <string>
#include <cmath>
using namespace std;

int main()
{
    string a;
    int i,b;
    cin >> a;
    for(i = 0;i<a.size();i++){
        b = a[i];
        if (b % 2 == 1) a[i] = '0';
    }
    while(a[0] == '0'){
        a.erase(0,1);
        }
    cout << a;
}
Editor is loading...