1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
#include<stdio.h> int main() { int a, b, i=0; a=20; b=5; printf("Enter the value to be divided: \n"); scanf("%d", &a); printf("Enter the value to be used to divide a: \n"); scanf("%d", &b); while(b>a) { i=i+1; a=a-b; } printf("%d", &i); return 0; }
1 2 3
Enter the value to be divided: Enter the value to be used to divide a: -4413348