Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
HW2A
/*Simple program showing how to read an integer and printing it to output in different formats.*/ #include "stdio.h" void aProgram(uint64_t a, uint64_t b) { uint64_t count = 1; uint64_t multiplier = 1; uint64_t num = 0; while (most > 0 || least > 0) { if ((most > 0) && ((count % 2) == 0)) { int temp = most % 10; most = (most - temp) / 10; num = num + temp * multiplier; } else if ((least > 0) && ((count % 2) != 0)) { int temp = least % 10; least = (least - temp) / 10; num = num + temp * multiplier; } multiplier = multiplier * 10; count ++; } printf("%d", num); } int main(void) { aProgram(11111111, 22222222); return 0; }
run
|
edit
|
history
|
help
0
c. new one
A_141211_mayor
incrementing values in an array
Undefined argument processing order in C
Intro to Arrays with comments
Finding type of triangle assignment
dynamic memory allocation.c
test
A_141212_HistoriaDePunteros
Pozdravljeni v mali soli C.