Last active
December 19, 2023 13:29
-
-
Save Tricky1975/96fb71dc68247e23dcc40c03060a8c6b 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
#include <iostream> | |
#include <string> | |
#include <stdio.h> | |
using namespace std; | |
string a{""}; | |
int main(){ | |
for(int i=1;i<=9;++i){ | |
a+=to_string(i); | |
auto l{stol(a)}; | |
printf("%9s x 8 + %d = %d\n",a.c_str(),i,l*8+i); | |
} | |
return 0; | |
} | |
// Really, mathematics never ceases to amaze me. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Output: