Â
In this, we are going to see how to modulus of two numbers to find remainder with the help of C++ program.
The Code given below can be used in Turbo C++ Compiler.
// Remainder of division two numbers
// modulus operator ('%') is used for remainder
#include<iostream.h>
#include<conio.h>
void main()
{
clrscr();
int a = 13;
int b = 4;
int c = a % b;
cout<<"Remainder of a / b is : "<<c<<endl;
getch();
}
// Remainder of division two numbers
// modulus operator ('%') is used for remainder
#include<iostream>
using namespace std;
int main()
{
int a = 13;
int b = 4;
int c = a % b;
cout<<"Remainder of a / b is : "<<c<<endl;
return 0;
}
#ENJOY CODING
Post a Comment
FOR ANY DOUBTS AND ERRORS FEEL FREE TO ASK. YOUR DOUBTS WILL BE ADDRESSED ASAP