Minggu, 15 Mei 2011

Program Inverting Procedure Numbers

This is one program where the program is to move or change of place from what is fed.bleak everyday examples in which he was seated in front be seated behind after the program starts. that's more or less its program is running.
please note the program is: 


# Include <iostream>

 # Include <conio.h>
    
class program {
       
friend ostream & operator <<(ostream &, & program);
      
friend istream & operator>> (istream &, & program); 
   
public:
       
program ();
      
void back () {
           
x = 0; / / inialisai or provision of the initial value at x = 0.
            
while (a> 0)
          
{
          
x = x * 10 + a% 10;
          
if (x == 0) court <<"0";
          
a = a/10;
          
}
          
;}
  
private:
       
int a, x;
      
};
   
program:: program () {
       
court <<"********************************************** **************************"<< endl;
      
court <<"Program To exchange or reverse his position" <<endl;
       
court <<"=============================================" <<endl;
      
}
   
istream & operator>> (istream & ins, programs & entry) {
       
court <<"input number what you want:";
      
in>> enter. a;
      
return ins;
      
}
   
ostream & operator <<(ostream & out, programs & out) {
       
court <<"result of the exchange:";
      
out <<get out. x;
       
return out;
      
}
   
main () {
      
z program;
      
cin>> z;
      
z. return ();
      
court <<z;
      
getch ();
      
return 0;
      

Tidak ada komentar:

Posting Komentar