Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- with Ada.Text_IO;
- with Ada.Integer_Text_IO;
- with ada.float_text_IO;
- procedure In_Och_utmatningar is
- N : Integer;
- S : String (1..5);
- K : float;
- C : Character ;
- begin
- Ada.Text_IO.Put("Skriv in ett heltal: ");
- Ada.Integer_Text_IO.Get(N);
- Ada.Text_IO.Put("Du skrev in talet: ");
- Ada.Integer_TEXT_IO.Put(N,Width=>0);
- ada.text_IO.SKIP_LINE;
- Ada.Text_IO.New_Line(1);
- Ada.Text_IO.Put("Skriv in fem heltal: ");
- Ada.Integer_Text_IO.Get(N);
- Ada.Text_IO.Put("Du skrev in talen: ");
- Ada.Integer_Text_IO.Put(N,Width=>4);
- Ada.Integer_Text_IO.Get(N);
- Ada.Integer_Text_IO.Put(N,Width=>4);
- Ada.Integer_Text_IO.Get(N);
- Ada.Integer_Text_IO.Put(N,Width=>4);
- Ada.Integer_Text_IO.Get(N);
- Ada.Integer_Text_IO.Put(N,Width=>4);
- Ada.Integer_Text_IO.Get(N);
- Ada.Integer_Text_IO.Put(N,Width=>4);
- ada.text_IO.new_line(1);
- ada.text_io.skip_line;
- Ada.Text_iO.put("Skriv in ett flyttal: ");
- Ada.float_text_io.get(k);
- ada.text_Io.put("Du skrev in flyttalet: ");
- ada.float_TEXT_IO.put(K, fore=> 2, aft => 3,exp =>0);
- ada.text_io.skip_line;
- ADA.TEXT_io.New_line(1);
- ada.text_io.put("Skriv in ett heltal och ett flyttal: ");
- ada.integer_text_IO.get(N);
- ada.float_text_IO.get(K);
- ada.text_io.put("Du skrev in heltalet: ");
- Ada.integer_text_IO.put(N,Width=>4);
- ada.text_io.New_line(1);
- ada.text_IO.put("Du skrev in flyttalet: ");
- Ada.float_text_IO.put(k,Fore=>2,Aft=>4,exp=>0);
- Ada.text_Io.Skip_line;
- ada.text_IO.new_line(1);
- Ada.text_io.put("Skriv in ett tecken : " ) ;
- ada.text_io.get(C);
- ada.text_io.put("Du skrev in tecknet : " );
- ada.text_IO.put (C);
- ada.text_io.skip_line;
- ada.text_io.new_line(1);
- ada.text_io.put("Skriv in en sträng med 5 tecken: ");
- ada.text_io.get(S);
- ada.text_io.put("Du skrev in strängen: ");
- ada.text_IO.put(S);
- ada.text_io.skip_line;
- Ada.text_io.new_line(1);
- ada.text_io.Put("Skriv in en sträng med 3 tecken: ");
- Ada.text_io.get(S(1..3));
- Ada.text_IO.put("Du skrev in strängen: ");
- Ada.text_io.put(S(1..3));
- ada.text_io.Skip_line;
- Ada.text_io.new_line(1);
- Ada.text_io.put("Skriv in ett heltal och en sträng med 5 tecken: ");
- ada.integer_text_IO.get(N);
- Ada.Text_IO.Get(C);
- Ada.text_IO.get(S);
- Ada.text_IO.put("Du skrev talet:");
- Ada.text_IO.put("|");
- Ada.integer_text_IO.put(N,width=>0);
- Ada.text_IO.put("|");
- ada.text_IO.put(" och strängen ");
- Ada.text_IO.put("|");
- ada.text_IO.Put(S);
- Ada.text_IO.put("|");
- Ada.Text_IO.New_Line(1);
- Ada.Text_Io.SKIP_LINE;
- end In_Och_Utmatningar;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement