Created
January 13, 2014 15:11
-
-
Save Zulqurnain/caba178d8fd145f97225 to your computer and use it in GitHub Desktop.
C++ program to print: 13579
3579
579
79
9
This file contains hidden or 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
| #include<iostream> | |
| using namespace std; | |
| int main(){ // done by Zulqurnain jutt | |
| int Number=13579; | |
| for(int i=Number,j,count=1;i!=0;count=1){ | |
| for(j=i;j!=0;j/=10,count*=10){} | |
| cout<<i<<"\n"; | |
| count/=10; | |
| i%=count; | |
| } | |
| return 0; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment