Pseudocode

Joined
Oct 8, 2022
Messages
1
Reaction score
0
the teacher gives the task of making branching code, is this coding pseudocode or not?
Code:
#include<iostream>
using namespace std;

int main(){
    int jumlah;
    cout<<"jumlah buku yang anda pinjam = ";
    cin>>jumlah;
    
    if(jumlah< 2){
        cout << " buku telah berhasil dipinjam " <<endl;
    }else {
        jumlah;
        cout << "tidak dapat meminjam lebih dari 2 buku " <<endl;
    }
}
 
Joined
Mar 28, 2022
Messages
82
Reaction score
11
The given code is source code, a final version. It's not pseudocode.

Pseudocode is a sketch of the code that will later be produced.
It's like writing a document starting with a table of contents and then filling in details.

For example
Code:
// get user inputs x and y
// multiply them together
// present the answer
 
Last edited:

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,717
Messages
2,569,382
Members
44,701
Latest member
OurCBDLifeSupplement

Latest Threads

Top