Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- //CODING BY QLYNX
- int main (){
- char x;
- int jml=0;
- cout << "Input Karakter = ";cin >> x;
- while (x !='.')
- {
- switch (x){
- case '0': case '1': case '2':
- case '3': case '4': case '5':
- case '6': case '7': case '8':
- case '9':
- jml=jml+1;
- break;
- }
- cout << "Input Karakter = "<<x<< endl; cin >> x;
- }
- cout << "Jumlah Karakter Angka yang Diinput = " << jml << endl;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement