Originally Posted by
Milenko
I am starting to learn programming and so far we did not do any programs but only algorithms.
So in my question is actualy task to make algorithm
this is what I tried but the ansewer was, it is not good
If(workingDay==true){
inBookstore=“buyBooks“()
string[]booksTobuy=newString[9];
booksTobuy=["50 Shades","Emilly","Titanic","The Firm","The Third Twin","Baker Street","Biography of Mozzart",
"Golden Hair","Zoo"];
}
If(nonWorkingday()){PeterStayHome();
else"buyBooks"()
for(i=0,˂=9,i++);
while(atCashier)()
string basket[i]= booksTobuy[i]
nasket[3]="programiranje";
kosara=[3] // goes for The Firm
peterPay()
}
--- Update ---
As far as I can see his questions are based on Java language
If your teacher is looking for pseudocode I don't know, but I do know you can't run the code you've posted, and that's even without following your logic.
Why do you double quote some of your method names?
It's not “buyBooks“(), but buyBooks()
It's not while(atCashier)(), but while(atCashier()){
and there are many more issues