C++ Goto

Facebooktwitterredditpinterestlinkedinmailby feather

C++ goto Statement

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

Syntax

 

Example

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

Output:

Facebooktwitterredditpinterestlinkedinmailby feather

Leave a Comment