Skip to content

CGreenP/NPTEL-Introduction-to-Programming-in-C-Assignment-1-Question-2

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 

Repository files navigation

NPTEL-Introduction-to-Programming-in-C-Assignment-1-Question-2

NPTEL Introduction to Programming in C Assignment 1 Question 2

Question 2

You are given two integers, say M and N.

You must check whether M is an exact multiple of N, without using loops. You have to output 0 if M is not a multiple of N. You have to output M/N if M is a multiple of N.

Input

Two integers, say M and N.

Output

You have to output 0 if M is not a multiple of N. You have to output M/N if M is a multiple of N.

Sample input 1

100 5

Sample output 1

20

Sample input 2

16 4

Sample output 2

4

Sample input 3

4 16

Sample output 3

0

Sample input 4

45 49

Sample output 4

0

About

NPTEL Introduction to Programming in C Assignment 1 Question 2

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages