#include <iostream>
using namespace std ;
int main (){
int n , sum ;
int c[222] ;
sum = 0 ;
// This program let you calculate sum of only positive numbers
cout<<" Enter the number of positive numbers you want to add\n" ;
cin>> n ;
int i = 0 ;
int g = -1 ;
lolo :
++g ;
i = g ;
if(i == n )
goto dodo ; // escape the lope and goto dodo to print the sum
cout<<" Enter number "<< i+1 <<" you want to add \n";
cin>>c[i];
sum +=c[i] ;// Addition
if(c[i]>0)
goto jojo ; // got to the next iteration similar of for statement and skip what is in red
cout<<" \nYou entered anegative number \n";
sum-= c[i] ;// cancel the addiction
--i; // decremetnt the counter to cancel the increment
--g ;
goto jojo ; // next iteration
dodo :
cout <<"The sum of the positive numbers is "<<sum <<endl <<endl<<endl;
return 0 ;
}
i hope that this explained what meaning of goto