// penggunaan setfill dan setw( )
# include <stdio.h>
# include <conio.h>
# include <iostream.h>
# include <iomanip.h>
main( )
{
int a;
clrscr( );
cout<<"Penggunan Manipulator setfill()"<<"\n\n";
cout<<"-------------------------------"<<"\n";
for(a=1;a<=15;a++)
{
cout<<setfill('-');
cout<<setw(a)<<a<<endl;
}
getche( );
}
2--------------------------------------------------------------------------------------------
// Penggunaan Manipulator setw()
# include <stdio.h>
# include <conio.h>
# include <iostream.h>
# include <iomanip.h>
main( )
{
int a;
clrscr( );
cout<<"Penggunan Manipulator setw()"<<"\n\n";
cout<<"-------------------------------"<<"\n";
for(a=1;a<=15;a++)
{
cout<<setw(a)<<a<<endl;
}
cout<<"-------------------------------"<<"\n";
getche( );
}
Tidak ada komentar:
Posting Komentar