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
#include <iostream>
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:
Please format your code using the markdown cheatsheet, it will look much better. This is how it looks like on my post.
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
thanks @loomy I will make sure I do that
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
Heya @learnandgrow
I am glad to find a profile sharing Computer Programming. We share mutual interest in here.
Thanks & Stay Connected.
You might want to check one of my enlightening posts about Programming.
https://steemit.com/art/@premraval010/the-art-of-computer-programming-or-donald-knuth
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
sure why not?
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
@originalworks
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
The @OriginalWorks bot has determined this post by @learnandgrow to be original material and upvoted it!
To call @OriginalWorks, simply reply to any post with @originalworks or !originalworks in your message!
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
You got a 1.50% upvote from @upme requested by: @learnandgrow.
Send at least 1.5 SBD to @upme with a post link in the memo field to receive upvote next round.
To support our activity, please vote for my master @suggeelson, as a STEEM Witness
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
This post has received gratitude of 1.09 % from @appreciator thanks to: @learnandgrow.
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
This post has received a 5.08 % upvote from @boomerang thanks to: @learnandgrow
@boomerang distributes 100% of the SBD and up to 80% of the Curation Rewards to STEEM POWER Delegators. If you want to bid for votes or want to delegate SP please read the @boomerang whitepaper.
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit