Advertisement
chandra163M

ADA if/else statement

Dec 8th, 2020 (edited)
2,942
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Ada 0.35 KB | None | 0 0
  1. with Ada.Text_IO;
  2. use Ada.Text_IO;
  3.  
  4. procedure Main is
  5.    Name : STRING (1..50);
  6.  
  7. begin
  8.    Put("Hallo, whats your name?");
  9.    Get(Name);
  10.  
  11.    if (Name = "William") then
  12.       Put_Line ("Hai william");
  13.    elsif (Name = "Erick") then
  14.       Put_Line ("Hai erick");
  15.    else
  16.       Put_Line ("i dont know, who are you!");
  17.       end if;
  18.    end Main;
  19.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement