Created
November 15, 2020 21:59
-
-
Save modos/465aed391f26d01771f320908cf19bb7 to your computer and use it in GitHub Desktop.
عدد چاپ کن
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/****************************************************************************** | |
Online C++ Compiler. | |
Code, Compile, Run and Debug C++ program online. | |
Write your code in this editor and press "Run" button to compile and execute it. | |
*******************************************************************************/ | |
#include <iostream> | |
using namespace std; | |
int main() | |
{ | |
string number; | |
cin >> number; | |
int i = 0; | |
for (int i = 0; i < number.size(); i++) { | |
int x = number[i] - '0'; | |
cout << x << ": "; | |
for (int j = 0; j < x; j++) { | |
cout << x; | |
} | |
cout << endl; | |
} | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
۶۳