How to Find the Multiple of a Number

In this Problem we learn how to find the multiple of a number in C++. First user will input the number, program asked to enter the number to check that rather this number is multiple of that number or not ? 

Source Code

#include<iostream>
using namespace std;
int main ()
{
 int a,b=0;
 cout<<" Enter Your Number :";
 cin>>a;
 cout<<" Enter the Number to check its  Multiple  :";
 cin>>b;
 if (a%b==0)
 {
  cout<<b <<"  is Multiple of this Number! \n  ";
 }
 else
 {
  cout<< b <<" is Not Multiple of this Number! \n ";
 }
}

Output of the Program

C++ Programming

Share on Google Plus

About Asad

Asad Niazi is Software Engineer , Programmer, Web Developer and a young mentor of BloggersTown and PProgramming. Asad Love to writes about Technology, Programming, Blogging and make money online.
    Blogger Comment
    Facebook Comment

0 comments:

Post a Comment