Hey steemit and steemians.
another c++ program, not one this two programs.
Lets get started
Continue statement program.
Program Body:
# include <iostream>
using namespace std;
void wolf();
int main(){
int a =1;
while (a <=5){
a ++;
if(a ==3){
continue;
a ++;
}
cout<<a <<endl;
}
wolf();
}
void wolf(){
int x [2][2]{{
90,25
},{
10,5
}
};
cout <<x[0][0]<<endl;
cout <<x[1][1]<<endl;
}
School roll number program:
Program Body
using namespace std;
void display();
int main(){
cout<<"welcome to this G.H.S no#3 school"<<endl;
cout<<"press 1 to go to class 9th blue"<<endl;
cout<<"press 2 to get into class 9th pink"<<endl;
int a,c,e,d;
cin>>a;
switch (a){
case 1:{
cout<<"you entered in 9th blue class"<<endl;
int b[2][2]{
{
11,30
},
{
85,97
}
};
cout<<"enter the roll no of students there are only 2 of them"<<endl;
cin>>c;
if(c==1){
cout<<b[0][0]<<" "<<b[0][1]<<endl;
}else if(c==2){
cout<<b[1][0]<<" "<<b[1][1]<<endl;
}break;}
case 2:{
int d;
cout<<"you entered in 9th pink class"<<endl;
int e[2][2]={
{
100,99
},
{
23,01
}
};
cout<<"enter the roll no of students there are only 2 of them"<<endl;
cin>>d;
if(d==1){
cout<<e[0][0]<<" "<<e[0][1]<<endl;
}else if(d==2){
cout<<e[1][0]<<" "<<e[1][1]<<endl;
}
}
}
display();
}
void display (){
cout<<"visit new places.there are ten of them"<<endl;
int f=10;
cout<<f<<endl;
}
Two programs for today try them out in your compilers and share your reviews and thoughts.
THANKS: