Programming in C
Programming in C
4th Edition
ISBN: 9780321776419
Author: Stephen G. Kochan
Publisher: Addison-Wesley
Expert Solution & Answer
Book Icon
Chapter 3, Problem 9E

Explanation of Solution

Program:

The program will find out the next largest even multiple for the given values:

//include the header file

#include <stdio.h>

//definition of main method

int main (void)

{

//declare and initialize value to the variables

int i = 365, j = 7, ans;

//calculate the ans

ans = i + j - i % j;

//display the result

printf ("The answer of i = %d and j = %d is: %d\n", i, j, ans);

//reinitialize value to the variables

i = 12258;

j = 23;

//calculate the ans

ans = i + j - i % j;

//display the result

printf...

Blurred answer
Students have asked these similar questions
let n = 1*3*5*....*197*199 (the product of first 100 odd numbers)   find the last 2 digits of n
Suppose n is a positive integer.
ii. find the value of N so that y less than 0.00000075.
Knowledge Booster
Background pattern image
Similar questions
SEE MORE QUESTIONS
Recommended textbooks for you
Text book image
C++ Programming: From Problem Analysis to Program...
Computer Science
ISBN:9781337102087
Author:D. S. Malik
Publisher:Cengage Learning
Text book image
EBK JAVA PROGRAMMING
Computer Science
ISBN:9781337671385
Author:FARRELL
Publisher:CENGAGE LEARNING - CONSIGNMENT
Text book image
Systems Architecture
Computer Science
ISBN:9781305080195
Author:Stephen D. Burd
Publisher:Cengage Learning