Enter a password and check whether the password is “fuji”. I so enter 2 numbers and calculate total  and average. Otherwise display ‘Access denied’.

 

Program Password;

Uses wincrt;

VAR

tot , avg, num_1,num_2 :Integer;

Password:string;

Begin

Clrscr;

Write (“enter password”);

Readln (password);

If (password =  fuji) then

Write (“enter num 1”);

Readln (num_1);

Write (“enter num 2”);

Readln (num_2);

tot:=num_1+num_2;

Write (“total”);

Write (tot);

Else

Write (“Access denied”);

End.

[HOME]  [2]  [3]  [4]  [5]  [6]  [7]  [8]  [9]  [10]  [11]  [12]  [13]  [14]  [15]  [16]  [17]  [18]  [19]  [20]  [21]  [22]  [23]  [24]  [25]  [26]  [27]  [28]  [29] [30]  [31]  [32]  [33] 

<<[PREVIOUS]                   [NEXT]>>

 

 

www.kiddiesnet.com