Aligned text print

 


//setw

#include<iostream.h>

#include<iomanip>//setw



int main(int argc, char *argv[])

{

//right justified aligned cout<<setw(10)<<"Hello"<<setw(5)<<"all"<<endl;

cout<<setw(10)<<"hi"<<setw(5)<<"yo"<<endl;

return 0;

}

Comments

Popular posts from this blog

serial to parallel test with 74c595 and pic mcu

ဆိုလာ စနစ္ရွိ BATTERY AMPACITY အား design ထုတ္တြက္ခ်က္ၿခင္း (1) watt hour ရယူၿခင္း

INTERRUPT_ON_CHANGE_18f4550