Indian Railways Berth displaying System

by

 

The berth displaying system is important for displaying your berth based on your berth number.

IRCTC_final.m
clc;
clear;
%% % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % 
disp('***Welcome to Indian Railways Berth displaying System***');
disp('***Created by Mr. KiranKumar Kulkarni***');

for i=3:-1:1
disp('******************************************************')
disp('Please enter your berth number in figures');

berth_number = input('');
%% % % % % % % % % % % % % % % % % % % % % % % % % % % % % % 
    for k=1:floor(berth_number/8)
        
    berth_number=berth_number-8;
   
    end    

%% % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % 
  disp('******************************************************')
    if berth_number==0
       
    disp('Your berth is SIDE UPPER');

elseif berth_number==1
       
    disp('Your berth is LOWER');

elseif berth_number==2
    
    disp('Your berth is MIDDLE');

elseif berth_number==3
    
    disp('Your berth is UPPER');
    
elseif berth_number==4
    
    disp('Your berth is LOWER');
    
elseif berth_number==5
    
    disp('Your berth is MIDDLE');
    
elseif berth_number==6
    
    disp('Your berth is UPPER');
    
elseif berth_number==7
    
    disp('Your berth is SIDE LOWER');
    
elseif berth_number==8
    
    disp('Your berth is SIDE LOWER');
    
    end
    
  disp('******************************************************')

    disp('Number of trials left=')
    disp(i-1)
end
%%%%%%%%%%%%%%%%%%%%%%%%%%THE END%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 

Contact us