Search⌘ K

Example 1: Round Off to Another Integer's Multiple

Explore how to write a C program to find the smallest multiple of one integer that exceeds another integer. Understand the use of arithmetic operators such as addition, subtraction, and modulo to solve control flow problems. This lesson helps learners apply practical control flow logic to real-world programming tasks.

Problem

Write a program to predict the smallest multiple of j but it should be larger than i.

Example

Input (i, j) Output
...