Finding Divisible Value in C Programming


#include <stdio.h>

int main()
{
    int n,d,r;
    printf("\nEnter the number :");
    scanf("%d",&n);
    printf("\nEnter divided number :");
    scanf("%d", &d);
    r=n+d-(n%d);
    printf("\nNumber :%d",r);

    return 0;
}

Comments