Hi.. welcome
in my blog in.. “We Are Knowledge”… In here you will getting many IT knowledge.
From IT knowledge based dekstop programming until IT knowledge based web
programming.
Now.. I want
givingyou IT knowledge about program language “C++”. And discuss of “GOTO in
PASCAL.
Ok.. let’s do
read my article…
Using goto in
PASCAL likely using goto in other program language…
Copy this
program then paste in your software likely “turbo pascal”, because I using it
fir making the goto program:
Example 1 :
#include <conio.h>
#include <iostream.h>
main()
{
goto start;
a:
cout << "WE ARE
KNOWLEDGE" << endl;
goto b;
c:
cout << "MANY IT KNOWLEDGE"
<< endl;
goto d;
e:
cout << "THANKS FOR
VISITORS AND THE READERS" << endl;
goto end;
d:
cout << "LET'S READING MY
OTHER ARTICLE" << endl;
goto e;
b:
cout << "GIVING
YOU" << endl;
goto c;
start:
goto a;
end:
getch();
}
Note ::
You can using notepad or notepad
++, but went saving you must change the save become “save as type =”cpp”. Ex :
goto.cpp.
Please for change all quotes (‘ ‘)
or (“ “), in order to nothing error in your program
Please press : alt +F9 >> compiling the program,
and
Please press : ctrl + F9
>> execution the program
And
result :
WE ARE KNOWLEDGE
GIVING YOU
MANY IT KNOWLEDGE
LET'S READING MY OTHER
ARTICLE
THANKS FOR VISITORS AND
THE READERS
Logic ::
Goto
>> goto is statement at C++
for move from statement to other statement… In moving,, GOTO not execution
other statement.. GOTO want stop when condition done…
Goto a
>> for move to word “a” or label “a”
Main()
>> starting the program goto
Getch()
>> ending the program goto
Cout
>> statement for printing sentence in output window
End
>> the label place for move of goto
#include <conio.h>
>> for include in forder
conio
#include <iostream.h>
>> for include in folder
iostream, and using statement “getch()”
OK.. just it….
I hope you likely….
Seee you later …