myszaa Posted November 18, 2013 Report Share Posted November 18, 2013 Witam. Mój program polega na tym że w funkcji for losuje kolejne liczby na pomoca rand i wypisuje liczby jedną pod drugą. Mam pytanie : Czy da się tak zapisywać aby zawsze cześć jedności była zawsze pod cześcią jedności a nie od lewej. np 4567 i 2 (aby 2 była pod 7 a nie pod 4)? Link to comment Share on other sites More sharing options...
nozyck Posted November 18, 2013 Report Share Posted November 18, 2013 Da się - http://www.cplusplus.com/reference/cstdio/printf/ Link to comment Share on other sites More sharing options...
myszaa Posted November 18, 2013 Author Report Share Posted November 18, 2013 a tak konkretnie to które to? ;]bo jakoś nie moge znaleźć Link to comment Share on other sites More sharing options...
nozyck Posted November 19, 2013 Report Share Posted November 19, 2013 Popatrz na output - masz tam różne warianty. Link to comment Share on other sites More sharing options...
myszaa Posted November 19, 2013 Author Report Share Posted November 19, 2013 ale nie wiem który poprawny do mojego problemu Link to comment Share on other sites More sharing options...
nozyck Posted November 19, 2013 Report Share Posted November 19, 2013 Masz parametr width (%10d). Link to comment Share on other sites More sharing options...