Please note, this is a STATIC archive of website www.tutorialspoint.com from 11 May 2019, cach3.com does not collect or store any user information, there is no "phishing" involved.
Tutorialspoint

Compile and Execute Erlang Online

-module(helloworld). 
-import(io,[fread/1,fwrite/2]).
-export([start/0]). 

start() -> 
   Salary = [90000,75000,65000,50000],
   Grade = A,B,C,D,
   
   io:fwrite("Welcome to Salary Bonus Calculation"),
  {g} = io:fread("~g").
    
     if 
      A == 90000 -> 
         io:fwrite("A is equal to 20% Bonus You Get"); 
      B == 75000 -> 
         io:fwrite("B is equal to 15% Bonus You Get"); 
      C == 65000 -> 
         io:fwrite("C is equal to 10% Bonus You Get"); 
      D == 50000 -> 
         io:fwrite("D is equal to 5% Bonus You Get"); 
      true -> 
         io:fwrite("False") 
   end.
   
    %A = 90000,
    %case A of 
    %io:fwrite("The value of A is 20% Bonus");
    %io:fwrite("The value of B is 15% Bonus")
  %  B = 75000,
 %   case B of
%    io:fwrite("The value of B is 15% Bonus");
   % C = 65000,
  %  case C of
 %   io:fwrite("The value of C is 10% Bonus");
%    D = 50000,
    %case D of
   % io:fwrite("The value of D is 5% Bonus");
   % end.
   
   %Result = X + Y, 
   %io:fwrite("~w",[Result]).
   
  
   
  % io:fwrite("~w",[1+1]).

Advertisements
Loading...

We use cookies to provide and improve our services. By using our site, you consent to our Cookies Policy.