Breaking News

C++ Program To Find Remainder Of Two Numbers

This program will show u that how to find remainder of two numbers in c++

There are many methods to find remainder of two numbers u can implement your logic also

Algorithm :

1.Start

2.Declare any to variables and get the input for them from the user

3.Declare another variable to store the result

4.After performing remainder operation store the result into the new or 3rd variable created

5.Print The result

6.That's it remainder of two numbers is found.....!!!!!!

Program (Method  1):

#include<iostream.h>
#include<conio.h>
void main()
{
            int a,b,c;
            cout<<"Enter The Value Of A";
            cin>>a;
            cout<<"Enter The Value Of B";
            cin>>b;
            c=a%b;
            cout<<"Addition ="<<c;
            getch();
}

Program (Method 2):

#include<iostream.h>
#include<conio.h>
void main()
{
            int a,b;
            cout<<"Enter The Value Of A";
            cin>>a;
            cout<<"Enter The Value Of B";
            cin>>b;
            cout<<"Addition ="<<a%b;
            getch();
}

No comments