0
i have to make a program to print traditional division format 2 digit divisor and 3 digit dividend
so i made a program for that but the problem is: for division we start like to choose digits which are divisible so for that i took 2 digit but we can take 3 digits aslo i know its difficult to understand what i am saying but have a look on my program #include <stdio.h> int main() { int a,b,c,d,e,f,g,h; printf("enter a 2 digit divisor: "); scanf("%d",&a); printf("enter a 4 digit divident: "); scanf("%d",&b); g=b/a; c=a*((b/100)/a); d=(b/100)-c; h=b%100; e=a*(h/a); f=h-e; printf(" %d\n%d |%d|\n -%d\n -----\n %d%d\n -%d\n -----\n %d\n -----\n",g,a,b,c,d,h,e,f); return 0; }
1 Resposta
+ 1
Really difficult. Pls explain what should your code print, and what's it printing instead.
Also, put your code in code playground, and link it inside the question with + button. This way, we can test it and possible solutions to guide you.