C++ Function: Print 45 Asterisks for Design the output

   using namespace std;
   void starline( );
   into main ()
   {
    starline ( );
    cout << "Data type Range" << endl;
    starline ( );
    cout << "char -128 to 127 " << endl
    << "short -32 ,768 to 32,767"<< endl
    << "int system independent: << endl
    << " long q-2,147,483,648 to 2,147,483,647" << endl;
    starline ( );
  return 0;
 }
//""""""""""""""""""""""""..
//starline ( )
// function defintion
void starline ( )
{
 for(into j=0;j<45; j++)
 cout << "*" ;
 cout << endl;
} 
 
 
The output from the program looks like this
*************************************
Data type Range
*************************************
Char -128 to 127
Short -32,768 to 32,767
Into system dependent
Double -2,147,483,648 to 2,147,483,647
*************************************

কোন মন্তব্য নেই:

একটি মন্তব্য পোস্ট করুন