Tuesday 5 August 2014

Write a Program in C++ which find the Multiple of a Number

Structure of the Problem Requirements 


In this Problem we learn how to find the multiple of a number in C++. First user will input the number and then again program asked to enter the number which check that rather this number is multiple of that number or not ? In solution just put the % against the number and then equal them to zero which mean zero reminder.

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
Finds Multiple of Numbers

Share it Please
asad

About Author!

Asad Niazi is Software Engineer , Programmer, Web Developers and a young mentor of Tech Solutions Desk and Blogging Solutions . Asad Love to writes about Technology, Programming, Blogging and make money online.

0 comments:

Post a Comment