Advertisement
Guest User

Untitled

a guest
Jan 4th, 2017
96
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Ada 0.63 KB | None | 0 0
  1. with Ada.Text_IO; use Ada.Text_IO;
  2. with Ada.Float_Text_IO; use Ada.Float_Text_IO;
  3.  
  4. procedure Lucka31 is
  5.    
  6.    
  7.    S : String(1..200);
  8.    StringCounter : Integer;
  9.    DelayTime : Duration:= 1.0;
  10. begin
  11.    
  12.    Put("Skriv in en rad text: ");
  13.    for J in 1..S'Last loop
  14.       Get(S(J));
  15.       if End_Of_Line then
  16.      StringCounter:= J;
  17.      exit;
  18.       end if;
  19.    end loop;
  20.    
  21.    Put("Du skrev in: ");
  22.    for K in 1..StringCounter loop
  23.       Put(S(K));
  24.       if K /= Stringcounter-1 then
  25.      delay Delaytime;
  26.      Delaytime:= Delaytime - 0.08;
  27.       else
  28.      delay 0.05;
  29.       end if;
  30.      
  31.    end loop;
  32.    
  33.    
  34.    
  35. end Lucka31;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement