10

/*Hey.. This program is made for inserting a number of four digits then print the number in
reverse order.
made by: khaled oweis

This algorithm shows how it works :
1. insert number and declare a variable for it
2. Divide the number by ten and declare a variable for the mod
3. do step (2) four times and print the mod results by using (cout)
lets begin... */


#include <iostream>
#include <cmath>
using namespace std;
void main()
{
int number,c ; //declare a variable for the number and for the mod results

cout<<"insert a number of four digits : ";
cin>> number;

number= number/10 ;
c= (number mod 10)*10 ;

}


please help
The C++ modulus operator is %
Topic archived. No new replies allowed.