Hva skrives ut hvis vi kjører dette scriptet?
Code Block |
---|
|
fprintf('%3d,', 1);
fprintf('%03d,', 1);
fprintf('%-3d,', 1);
fprintf('%-03d!\n', 1);
fprintf('%.2f,', 2.524);
fprintf('%6.2f,', 2.524);
fprintf('%06.2f,', 2.524);
fprintf('%-6.2f,', 2.524);
fprintf('%-06.2f!\n', 2.524);
fprintf('%5s,', 'hei');
fprintf('%05s,', 'hei');
fprintf('%-5s,', 'hei');
fprintf('%-05s!\n', 'hei'); |
Widget Connector |
---|
url | https://www.youtube.com/watch?v=AhCO0V21ZyM |
---|
|
Expand |
---|
title | Hvis du har prøvd selv, trykk her for å se svaret... |
---|
|
Code Block |
---|
1,001,1 ,1 !
2.52, 2.52,002.52,2.52 ,2.52 !
hei,00hei,hei ,hei00! |
|