
- Форум
- По малко от всичко
- Информационни технологии
- Помощ със задача с функция на C
Леле майко какви кодове сте писали :Д
Код:#include <stdio.h> void dectobin(unsigned long long input) { unsigned long long bin=0, i=1, ost; for ( ;input;) { ost=input%2; bin+=(i*ost); input/=2; i*=10; } printf("%llu", bin); } int main(void) { unsigned long long a; scanf("%llu", &a); dectobin(a); return 0; }
Don't hate the hacker,
hate the code!