class and student program

in #programming8 years ago (edited)

Hey steemians.

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;
}

About program:

Its a Class and student roll number database(exagerated lols) prototype program.

Created in c++

I hope you liked it! THANKS

Sort:  

Congratulations! This post has been randomly Resteemed! For a chance to get more of your content resteemed join the SteemEngine network!

This post has received a 0.21 % upvote from @buildawhale thanks to: @learnandgrow. Send at least 1 SBD to @buildawhale with a post link in the memo field for a portion of the next vote.

To support our daily curation initiative, please vote on my owner, @themarkymark, as a Steem Witness

Coin Marketplace

STEEM 0.04
TRX 0.33
JST 0.079
BTC 63264.99
ETH 1671.73
USDT 1.00
SBD 0.42