Cod sursa(job #982441)

Utilizator remus88Neatu Remus Mihai remus88 Data 9 august 2013 11:39:36
Problema Cifre Scor 0
Compilator cpp Status done
Runda Arhiva de probleme Marime 0.29 kb
#include <fstream>
using  namespace std;

ifstream f("cifre.in");
ofstream g("cifre.out");

int main()
{
    int nr, c, x=0;
    f>>nr;
    while (nr!=0)
    {
        c= nr % 10;
        nr= nr / 10;
        g<<c<<' ';
        x++;

    }
    g<<'\n'<<x<<'\n';
    return 0;
}