

Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!


#include<stdio.h> int main() { int k; int m; m=5;
for (k=1; k< m; k=k+1) { printf("# "); } printf("#\n"); for (k=1; k< m; k=k+1) { printf(" # "); } printf("\n"); k=6; while (k>0) { printf(" / "); k=k-1; } printf("\n"); for (k=1; k<=3*m; k=k+3) printf("/"); printf("\n"); return(0); }
19 /2 = 9, R 1
9 /2 = 4, R 1 4 /2 = 2, R 0 2 /2 = 1, R 0 1 /2 = 0, R 1 So the output should be 11001 which is the reverse of the base two representation of 19.