C++ Goto

tutorial and example
tutorial and example

C++ goto Statement

goto statement is used to jump the flow of sequence of program execution. It transfers the control to some other part of program. The goto uses an identifier that encountered the control of program jumps to identifier.


C++ goto Example

This program calculates the average of numbers entered by user. If user enters negative number, it ignores the number and calculates the average of number entered before it.