Jumat, 19 Juni 2020

Programming KDE Using Qt

Programming KDE Using Qt
    In Chapter 16, you looked at the GNOME/GTK+ GUI libraries for creating graphical user interfaces under X. These libraries are only half of the story; the other big player on the GUI scene in Linux is KDE/Qt, and in this chapter you look at these libraries and see how they shape up against the competition.
    Qt is written in C++, the standard language in which to write Qt/KDE applications, so in this chapter you’ll be obliged to take a diversion from the usual C and get your hands dirty with C++. You might like to take this opportunity to refresh your memory on C++, especially reminding yourself of the principles of derivation, encapsulation, method overloading, and virtual functions.
In this chapter, we cover
  • An introduction to Qt
  • Installing Qt
  • Getting started
  • Signal/slot mechanism
  • Qt widgets
  • Dialogs
  • Menus and toolbars with KDE
  • Building your CD database application with KDE/Qt
Introducing KDE and Qt
    KDE (K Desktop Environment) is an open source desktop environment based on the Qt GUI library. A host of applications and utilities are part of KDE, including a complete office suite, a Web browser, and even a fully featured IDE for programming KDE/Qt applications (KDevelop, covered in Chapter 9). Industry recognition of how advanced KDE’s applications are came when Apple chose to use KDE’s Web browser as the core of the primary Web browser for Mac OS X, called Safari, known as a very fast browser.

Why use Qt Creator

KDE4's ktimetracker loaded as QtCreator project
To create your C++ applications you can use any text editor. But life will be much easier if you gain QtCreator's features. That means
  • you can get your source code saved, built and run with one click
  • you get code-completion
  • you can find all places in your source code where you call a function (e.g. "where do I call refresh()")
  • you can go back to a more recent cursor position with your editor, even if this is in another file
  • you can checkout and commit to Subversion or Git repositories without leaving your workflow

Creating a new program

Here is a short example of how you can create a "hello world" application. For more information read the user documentation.
Step 0
Call QtCreator
qtcreator
Then select New File or Project -> Qt C++ Project -> Qt Gui Application -> name = helloworld -> Next -> Next -> Finish
Step 1
Select Edit -> Forms -> mainwindow.ui. Add the widgets you want by drag-and-drop:
Designer-step1.png
Step 2
Select the mainwindow. This is the one un-intuitive step. To lay out the objects in the mainwindow, you do not select the objects in the mainwindow, but the mainwindow itself.
Designer-step2.png
Step 3
Select Form -> Lay Out in a Grid
Designer-step3.png
Result
You get a decent look, and if you resize the window, the widgets resize as well.
Designer-result.png

Using KDE libraries

To use KDE classes like KMessageBox, you need to tell QtCreator to use the KDE libraries when building. Go to your home directory, change into yourproject and modify yourproject.pro. Add the line
LIBS += -lkdeui
Then you can start using KDE classes in your code.

Adding a toolbar

To add a toolbar, right-click on the UI and choose "Add Toolbar". Then you can set icons and text in your mainwindow's constructor with code like this:
ui->toolBar->addAction(QIcon("/usr/share/icons/oxygen/22x22/apps/ktip.png"),"hello world");

Load an existing project

This describes how to use QtCreator to integrate existing KDE 4 applications. It has been tested with QtCreator 1.2.80 and SUSE Linux 11.1 but should work same or similar with every combination. As an example KDE application we use ktimetracker from the kdepim module, other applications should work likewise.
You can either work with code on your disk or have QtCreator do the repository checkout.

Use code from your disk

  • import the CMakeLists.txt file (File -> Open -> kdepim/CMakeLists.txt)
  • as build directory choose kdepim
  • you will automatically come to a screen where you can run CMake
  • continue with the step "Run cmake"

Have QtCreator do the git checkout

  • choose File -> New File or Project -> Import Project -> Git Repository Clone.
  • enter a Git URL like git@git.kde.org:/kdepim
  • accept kdepim as checkout directory
  • type finish, see how the checkout starts
Note
If the checkout fails with the message "remote host hung up unexpectedly" do a checkout from konsole. You may have to accept git.kde.org's fingerprint.
  • you will automatically come to a screen where you can run CMake
  • continue with the step "Run cmake"

Have QtCreator do the subversion checkout

  • choose File -> New File or Project -> Import Project -> Subversion Checkout.
  • enter a Subversion URL like svn://anonsvn.kde.org/home/kde/trunk/KDE/kdepim
  • enter a checkout directory, i.e. the local directory where the code will be checked-out to
  • type finish, see how the checkout starts
  • you will automatically come to a screen where you can run CMake
  • continue with the step "Run cmake"

Run cmake

  • enter arguments for CMake like
/path/to/kdepim -DCMAKE_INSTALL_PREFIX=/usr/local -DLIB_SUFFIX=64 -DCMAKE_BUILD_TYPE=debugfull
DLIB_SUFFIX=64 means that you want to install your libraries into directories named lib64, not lib/path/to/kdepim is where your source code is.
  • click "Run cmake"
  • note: a .cbp file is created containing many information about the build
  • click "Finish"

Build it

  • configure QtCreator to build only ktimetracker:
Projects -> Active run configuration=ktimetracker -> build settings -> build steps -> make -> show details -> activate ktimetracker.
  • configure QtCreator to use 8 logical processors:
Projects -> Active run configuration=ktimetracker -> build settings -> build steps -> make -> show details -> addtional Arguments = -j8
  • choose Build -> Build All

Programming GNOME Using GTK+

Getting Started with GTK+

   GTK+ is a widget toolkit. Each user interface created by GTK+ consists of widgets. This is implemented in C using GObject, an object-oriented framework for C. Widgets are organized in a hierachy. The window widget is the main container. The user interface is then built by adding buttons, drop-down menus, input fields, and other widgets to the window. If you are creating complex user interfaces it is recommended to use GtkBuilder and its GTK-specific markup description language, instead of assembling the interface manually. You can also use a visual user interface editor, like Glade.
   GTK+ is event-driven. The toolkit listens for events such as a click on a button, and passes the event to your application.
This chapter contains some tutorial information to get you started with GTK+ programming. It assumes that you have GTK+, its dependencies and a C compiler installed and ready to use. If you need to build GTK+ itself first, refer to the Compiling the GTK+ libraries section in this reference.

Basics

   To begin our introduction to GTK, we'll start with a simple signal-based Gtk application. This program will create an empty 200 × 200 pixel window.
Create a new file with the following content named example-0.c.
#include <gtk/gtk.h>

static void
activate (GtkApplication* app,
          gpointer        user_data)
{
  GtkWidget *window;

  window = gtk_application_window_new (app);
  gtk_window_set_title (GTK_WINDOW (window), "Window");
  gtk_window_set_default_size (GTK_WINDOW (window), 200, 200);
  gtk_widget_show_all (window);
}

int
main (int    argc,
      char **argv)
{
  GtkApplication *app;
  int status;

  app = gtk_application_new ("org.gtk.example", G_APPLICATION_FLAGS_NONE);
  g_signal_connect (app, "activate", G_CALLBACK (activate), NULL);
  status = g_application_run (G_APPLICATION (app), argc, argv);
  g_object_unref (app);

  return status;
}
You can compile the program above with GCC using:

        gcc `pkg-config --cflags gtk+-3.0` -o example-0 example-0.c `pkg-config --libs gtk+-3.0`
      
For more information on how to compile a GTK+ application, please refer to the Compiling GTK+ Applications section in this reference.
All GTK+ applications will, of course, include gtk/gtk.h, which declares functions, types and macros required by GTK+ applications.
Even if GTK+ installs multiple header files, only the top-level gtk/gtk.h header can be directly included by third party code. The compiler will abort with an error if any other header is directly included.
In a GTK+ application, the purpose of the main() function is to create a GtkApplication object and run it. In this example a GtkApplication pointer named app is called and then initialized using gtk_application_new().
When creating a GtkApplication you need to pick an application identifier (a name) and input to gtk_application_new() as parameter. For this example org.gtk.example is used but for choosing an identifier for your application see this guide. Lastly gtk_application_new() takes a GApplicationFlags as input for your application, if your application would have special needs.
Next the activate signal is connected to the activate() function above the main() functions. The activate signal will be sent when your application is launched with g_application_run() on the line below. The gtk_application_run() also takes as arguments the pointers to the command line arguments counter and string array; this allows GTK+ to parse specific command line arguments that control the behavior of GTK+ itself. The parsed arguments will be removed from the array, leaving the unrecognized ones for your application to parse.
Within g_application_run the activate() signal is sent and we then proceed into the activate() function of the application. Inside the activate() function we want to construct our GTK window, so that a window is shown when the application is launched. The call to gtk_application_window_new() will create a new GtkWindow and store it inside the window pointer. The window will have a frame, a title bar, and window controls depending on the platform.
A window title is set using gtk_window_set_title(). This function takes a GtkWindow* pointer and a string as input. As our window pointer is a GtkWidget pointer, we need to cast it to GtkWindow*. But instead of casting window via (GtkWindow*)window can be cast using the macro GTK_WINDOW()GTK_WINDOW() will check if the pointer is an instance of the GtkWindow class, before casting, and emit a warning if the check fails. More information about this convention can be found here.
Finally the window size is set using gtk_window_set_default_size and the window is then shown by GTK via gtk_widget_show_all().
When you exit the window, by for example pressing the X, the g_application_run() in the main loop returns with a number which is saved inside an integer named "status". Afterwards, the GtkApplication object is freed from memory with g_object_unref(). Finally the status integer is returned and the GTK application exits.
While the program is running, GTK+ is receiving events. These are typically input events caused by the user interacting with your program, but also things like messages from the window manager or other applications. GTK+ processes these and as a result, signals may be emitted on your widgets. Connecting handlers for these signals is how you normally make your program do something in response to user input.
The following example is slightly more complex, and tries to showcase some of the capabilities of GTK+.
In the long tradition of programming languages and libraries, it is called Hello, World.

Example 1. Hello World in GTK+
Create a new file with the following content named example-1.c.
#include <gtk/gtk.h>

static void
print_hello (GtkWidget *widget,
             gpointer   data)
{
  g_print ("Hello World\n");
}

static void
activate (GtkApplication *app,
          gpointer        user_data)
{
  GtkWidget *window;
  GtkWidget *button;
  GtkWidget *button_box;

  window = gtk_application_window_new (app);
  gtk_window_set_title (GTK_WINDOW (window), "Window");
  gtk_window_set_default_size (GTK_WINDOW (window), 200, 200);

  button_box = gtk_button_box_new (GTK_ORIENTATION_HORIZONTAL);
  gtk_container_add (GTK_CONTAINER (window), button_box);

  button = gtk_button_new_with_label ("Hello World");
  g_signal_connect (button, "clicked", G_CALLBACK (print_hello), NULL);
  g_signal_connect_swapped (button, "clicked", G_CALLBACK (gtk_widget_destroy), window);
  gtk_container_add (GTK_CONTAINER (button_box), button);

  gtk_widget_show_all (window);
}

int
main (int    argc,
      char **argv)
{
  GtkApplication *app;
  int status;

  app = gtk_application_new ("org.gtk.example", G_APPLICATION_FLAGS_NONE);
  g_signal_connect (app, "activate", G_CALLBACK (activate), NULL);
  status = g_application_run (G_APPLICATION (app), argc, argv);
  g_object_unref (app);

  return status;
}

You can compile the program above with GCC using:

        gcc `pkg-config --cflags gtk+-3.0` -o example-1 example-1.c `pkg-config --libs gtk+-3.0`
      
As seen above, example-1.c builds further upon example-0.c by adding a button to our window, with the label "Hello World". Two new GtkWidget pointers are declared to accomplish this, button and button_box. The button_box variable is created to store a GtkButtonBox which is GTK+'s way of controlling the size and layout of buttons. The GtkButtonBox is created and assigned to gtk_button_box_new() which takes a GtkOrientation enum as parameter. The buttons which this box will contain can either be stored horizontally or vertically but this does not matter in this particular case as we are dealing with only one button. After initializing button_box with horizontal orientation, the code adds the button_box widget to the window widget using gtk_container_add().
Next the button variable is initialized in similar manner. gtk_button_new_with_label() is called which returns a GtkButton to be stored inside button. Afterwards button is added to our button_box. Using g_signal_connect the button is connected to a function in our app called print_hello(), so that when the button is clicked, GTK will call this function. As the print_hello() function does not use any data as input, NULL is passed to it. print_hello() calls g_print() with the string "Hello World" which will print Hello World in a terminal if the GTK application was started from one.
After connecting print_hello(), another signal is connected to the "clicked" state of the button using g_signal_connect_swapped(). This functions is similar to a g_signal_connect() with the difference lying in how the callback function is treated. g_signal_connect_swapped() allow you to specify what the callback function should take as parameter by letting you pass it as data. In this case the function being called back is gtk_widget_destroy() and the window pointer is passed to it. This has the effect that when the button is clicked, the whole GTK window is destroyed. In contrast if a normal g_signal_connect() were used to connect the "clicked" signal with gtk_widget_destroy(), then the button itself would have been destroyed, not the window. More information about creating buttons can be found here.
The rest of the code in example-1.c is identical to example-0.c. Next section will elaborate further on how to add several GtkWidgets to your GTK application.

Sockets

Socket jaringan komputerLoncat ke navigasiLoncat ke pencarian  
  
   Socket adalah titik komunikasi dari lalu lintas komunitas antar proses di dalam sebuah jaringan komputer. Hampir semua komunikasi antar komputer sekarang berdasarkan protokol internet, oleh karena itu hampir semua socket di jaringan komputer adalah Socket Internet.Note
  1.      The socket() API creates an endpoint for communications and returns a socket descriptor that represents the endpoint.
  1. When an application has a socket descriptor, it can bind a unique name to the socket. Servers must bind a name to be accessible from the network.
  1.      The listen() API indicates a willingness to accept client connection requests. When a listen() API is issued for a socket, that socket cannot actively initiate connection requests. The listen() API is issued after a socket is allocated with a socket() API and the bind() API binds a name to the socket. A listen() API must be issued before an accept() API is issued.
  1.     The client application uses a connect() API on a stream socket to establish a connection to the server.
  1. The server application uses the accept() API to accept a client connection request. The server must issue the bind() and listen() APIs successfully before it can issue an accept() API.
  1.     When a connection is established between stream sockets (between client and server), you can use any of the socket API data transfer APIs. Clients and servers have many data transfer APIs from which to choose, such as send()recv()read()write(), and others.
  1.     When a server or client wants to stop operations, it issues a close() API to release any system resources acquired by the socket.
Note

       Hampir semua sistem operasi menyediakan application programming interface (API) yang memungkinkan sebuah aplikasi komputer mengkontrol dan menggunakan socket jaringan komputer. API socket internet biasanya berdasarkan pada standar berkeley sockets.  
       Sebuah alamat socket terdiri atas kombinasi sebuah alamat ip dan sebuah nomor port, mirip seperti sebuah koneksi telpon yang memiliki nomor telpon dan nomor ekstensinya. Berdasarkan alamat ini, socket internet mengirim paket data yang masuk ke sebuah proses atau thread aplikasi tujuan.
      Sockets are commonly used for client and server interaction. Typical system configuration places the server on one machine, with the clients on other machines. The clients connect to the server, exchange information, and then disconnect.
       A socket has a typical flow of events. In a connection-oriented client-to-server model, the socket on the server process waits for requests from a client. To do this, the server first establishes (binds) an address that clients can use to find the server. When the address is established, the server waits for clients to request a service. The client-to-server data exchange takes place when a client connects to the server through a socket. The server performs the client's request and sends the reply back to the client.
Currently, IBM supports two versions of most sockets APIs. The default i5/OS™ sockets use Berkeley Socket Distribution (BSD) 4.3 structures and syntax. The other version of sockets uses syntax and structures compatible with BSD 4.4 and the UNIX 98 programming interface specifications. Programmers can specify _XOPEN_SOURCE macro to use the UNIX 98 compatible interface.
      The following figure shows the typical flow of events (and the sequence of issued APIs) for a connection-oriented socket session. An explanation of each event follows the figure.
The two endpoints establish a connection, and bring the client and server together.
This is a typical flow of events for a connection-oriented socket:
The socket APIs are located in the communications model between the application layer and the transport layer. The socket APIs are not a layer in the communication model. Socket APIs allow applications to interact with the transport or networking layers of the typical communications model. The arrows in the following figure show the position of a socket, and the communication layer that the socket provides.
Position of a socket in the communication layer
    Typically, a network configuration does not allow connections between a secure internal network and a less secure external network. However, you can enable sockets to communicate with server programs that run on a system outside a firewall (a very secure host).
    Sockets are also a part of IBM's AnyNet® implementation for the Multiprotocol Transport Networking (MPTN) architecture. MPTN architecture provides the ability to operate a transport network over additional transport networks and to connect application programs across transport networks of different types.

Semaphores, Shared Memory, and Message Queues

UNIX Programming

"Chapter Tweleve - Semaphores, Message Queues and Shared Memory"

Chapter Outline
    Semaphores, Message Queues and Shared Memory
      Semaphores
        Semaphores Definition
        A Theoretical Example
        UNIX Semaphore Facilities
        Using Semaphores
        Semaphore Summary
      Shared Memory
        Overview
        Shared Memory Functions
        Shared Memory Summary
      Messge Queues
        Overview
        Message Queue Functions
        Queue Efficiency
        Message Queue Summary
      The Appliction
      IPC Status Commands
        Semaphores
        Shared Memory
        Messge Queues
      Summary
Lecture Notes

Semaphores, Message Queues and Shared Memory

We will now look at a set of Interprocess Communiction Facilities that were introducted in the AT&T System V.2 release of UNIX.

Semaphores

A semaphore is a special varible that takes only whole positive numbers and upon which only two operations are allowed: wait and signal. They are used to ensure that a single executing process has exclusive access to a resource.
Here are the signal notations:

Semaphore Definition

binary semaphore is a variable that can take only the values 0 and 1.
The definition of p and v are surprisingly simple. Suppose we have a semaphore variable, sv. The two operations are then defined as:

A Theoretical Example

Supposed we have two processes proc1 and proc2, both of which need exclusive access to a database at some point in their execution.
We define a single binary semaphore, sv, that starts with the value 1.
The required pseudo-code is:
Here's a diagram showing how the p and v operatons act as a gate into critical sections of code:

UNIX Semaphore Facilities

All the UNIX semaphore functions operate on arrays of general semaphores, rahter than a single binary semaphore.
The semaphore function definitions are:

semget
The semget function creates a new semaphore or obtains the semaphore key of an existing semaphore.
semop
The function semop is used for changing the value of the semaphore:
The first parameter, sem_id, is the semaphore identifier, as returned from semget.
The second parameter, sem_ops, is a pointer to an array of structures, each of which will have at least the following members:
semctl
The semctl function allows direct control of semaphore information:
The command parameter is the action to take and a fourth parameter, if present, is a union semun, which must have at least the following members:
Here are two common values of command are:

Using Semaphores

To experiment with semaphores, we'll use a single program, sem1.c, which we can invoke several times.
We'll use an optional parameter to specify whether the program is responsible for creating and destroying the semaphore.

Try It Out - Semaphores

1. After the #includes, the function prototypes and the global variable, we come to the main function. It creates the semaphores.
 2. The we have a loop which entersa and leaves the critical section ten times.
There, we first make a call to semaphore_p which sets the semaphore to wait.
3. After the critical section, we call semaphore_v, setting the semaphore available.
4. The function set_semvalue initializes the semaphore using the SETVAL command in semctl call.
5. The del_semvalue function has almost the same form, except the call to semctl uses the command IPC_RMID to remove the semaphore's ID:
6. semaphore_p changes the semaphore by -1 (waiting):
7. semaphore_v is identical except for setting the sem_op part of the sembuf structure to 1, so that the semaphore becomes available:
Here's some sample output, with two invocations of the program:
How It Works
The program sets up a semaphore. It then loops ten times, with pseudo-random waits in its critical and non-critical sections.
The critical section is guarded by calls to our senaphore_p and senaphore_v functions.

Semaphore Summary

Semaphores have a complex programming interface.

Shared Memory

Shared memory is the second of the three IPC facilities. It allows two unrelated processes to access the same logical memory.

Overview

Shared memory is a special range of addresses that is created by IPC for one process and appears in the address space of that process.
Other processes can then 'attach' the same shared memory segment into their own address space.

Shared Memory Functions

The functions for shared memory resemble those for semaphores:
As with semaphores, the include files sys/types.h and sys/ipc.h are normally also requried.
shmget
We create shared memory using the shmget function:
shmat
when you first crete a shared memory segment, it's not accessible by any process.
To enable access to the shared memory, we must attach it to the address space of a process. We do this with the shmat function:
shmdt
The shmdt function detaches the shared memory from the current process.
shmctl
The control functions for shared memory are (thankfully) rather simpler than the more complex ones for semaphores:
The shmid_ds structure has at least the following members:
The first parameter, shm_id, is the identifier returned from shmget.
The second parameter, command, is the action to take. It can take three values:

Try It Out - Shared Memory

1. Our first program is a coonsumer. After the header, a suitable MEM_SZ and a structure have been defined.
2. We now make the shared memory accessible to the program:
3. The next portion of the program assigns the shared_memory segment to shared_stuff.
4. Lastly, the shared memory is detached and then deleted:
5. Our second program, shm2.c, is the producer and allows us to enter data for consumers.

When we run these programs, we get some sample output such as this:
How It works
The first program, shm1, cretes the shared memory segment and then attaches it to its address space.
The second program, shm2, gets and sttaches the same shared memory segment. It get data and makes it available to the other program.

Shared Memory Summary

Shared memory provides an efficient way of sharing and passing data between multiple processes.

Message Queues

We'll now take a look at the third and final IPC facility: message queues.

Overview

Message queues provide a way of sending a block of data from one process to another.

Message Queue Functions

The message queue function definitions are:
msgget
We crete and access a message queue using the msgget funciton:
msgsnd
The msgsnd function allows us to add a message to a message queue.
When you're using messages, it's best to define your message structure something like this:
msgrcv
The msgrcv function retrieves messages from a message queue.
msgctl
The msgctl is similar to the control function for shared memory.
The msqid_ds structure has at least the following members:
The first parameter, msqid, is the identifier returned from msgget.
The second parameter, command, is the action to take. This can take three values.

Try It Out - Message Queues

1. Here's the receiver program:

2. First, we set up the message queue:
3. Then the messages are retrieved from the queue, until an end is encountered. Lastly, the message queue is deleted:
4. Thesender program is very similar to msg1.c.
We now have a call to msgsnd to send the entered text to queue:

we'll run the sender, msg2, first. Here's some sample output:
How It Works
The sender program creates a message queue and adds messages to the queue. The receiver gets the message queue id and receives messges until the special text end is received.

Queue Efficiency

We can test the efficiency of message queues by strippin the two programs down to a bare minimum, and then passing 10 Mb of data between them.

Message Queue Summary

Message queues provide a reasonably easy and efficient way of passing data between two unrelated processes.

The Application

We're now in a position to modify our CD database application to use the IPC facilities that we've seen in this chapter.
To convert our CD application to use IPC facilities, we only need to replace the file pipe_imp.c.

Try It Out - Revising the Server Functions

1. First, we include the appropriate headers, declare some message queue keys and define a structure to hold our message data:
2. Two variabless with file scope hold the two queue identifiers returned from the msgget function:
3. We make the server responsible for creating both message quese:
4. The server is also responsible for tidying up if it ever exits.
5. The server read function reads a message of any type from the queue, and returns the data part of the message.
6. Sending a response uses the client process ID that was stored in the request to address the message:

Try It Out - Revising the Client Functions

1. When the client starts, it needs to find the server and client queue identifiers.
2. As with the server,when the client ends, we set our file scope varibles to illegal values.
3. To send a message to the server, we store the data inside our structure.
4. When the client retrieves a message from the server, it uses its process ID to receive only messages addressed to itself, ignoring any messages for other clients.
 pipe_imp.c, we need to define an extra four functions.

IPC Status Commands

Most UNIX systems with semaphores provide the ipcs and ipcrm commands that allow command line access to IPC information.

Semaphores

To examine the state of semaphores on the system, use the ipcs -s command. If any semaphores are present, the output will have the form:
You can use the ipcrm command to remove any semaphores left by programs.
To delete the above semaphores, the command (on Linux) would be:
Many UNIX systems would use:

Shared Memory

The ipcs -m and ipcrm shm <:id> (or ipcrm -q <id>) commands provide command line programs for accessing the details of shared memory).
Here's some sample output from ipcs:

Message Queues

For messge queues the commands are ipcs -q and ipcrm msg <id> (or ipcrm -q <id>).
Here's some sample output from ipcs:

Summary

In this chapter we loked at three inter-process communication facilities: semaphores, shared memory, and message queues.

Enam Contoh Tabel NOtasi Pseudocode dari Algorirma

Berikut enam contoh tabel notasi pseudocode dari algoritme  1. Contoh Pseudocode untuk menginput tiga buah bilangan Disini kita akan membu...