Emperor Sabi avatar

Class roll number program

learnandgrow

Published: 21 Jan 2018 › Updated: 21 Jan 2018Class roll number program

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

}

I hope you guys liked it

Leave Class roll number program to:

Written by

SCIENTIST, Programmer,Photographer, Entrepreneur & Steemian .

Read more #programming posts


Best Posts From Emperor Sabi

We have not curated any of learnandgrow's posts yet. But you can encourage our curation team to review posts by visiting them regularly and by referring other readers. Because we give priority to frequently read content.

More Posts From Emperor Sabi