#6 Switch Case Example

#include <iostream>
#include <math.h>
using namespace std;

int main(){
    int num = 1330;
    int n;
    cout<<"Enter n for 100, 50, 20 or 1 Rs. notes: "; cin>>n;
    int a = num/n;

        switch (n)
        {
        case 100:{
            cout<<num/100<<" notes of 100 Rs.,"<<endl;
            num = num%100;

        case 50:
            cout<<num/50<<" notes of 50 Rs."<<endl;
            num = num%50;

        case 20:
            cout<<num/20<<" notes of 20 Rs."<<endl;
            num = num%20;

        case 1:
            cout<<num/1<<" notes of 1 Rs.";
            num = num%10;
            }
        }
}