Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <conio.h>
- using namespace std;
- int main()
- {
- int nr=0;
- char c=0;
- while (c!=13) // 13 e tasta enter
- {
- c=getch();
- cout<<'*';
- if (c!=13)
- {
- //fa ceva cu caracterul c
- nr=nr*10+(c-48);
- }
- }
- cout<<endl;
- cout<<"numarul citit este:"<<nr;
- getch();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement