AssignmentsCS508VU

CS508 – Assignment No 1 Solved with Solution File

Solution File is Here. Download It and unzip.

Do not Copy and Paste other wise you rewarded with Zero Marks. Thanks for Visiting.

If you found any error or mistake in solution correct it and Inform me.

Thanks for you support.

Solution file will be provided above and below. Thanks and Keep visiting.

If you need any other VU Assignment Solution. Click here. Thanks

To many haters are here which give negative comment on my videos. I make this assignment for give respect only. Thanks if you give me respect and love. My Attention is not to distract. Therefore i upload inline solution here. You can check and copy from here.

Remember Me in your prayer

Solution:

with Ada.Text_IO; 
use Ada.Text_IO;

procedure Assignment is
type Char_Counts is array (Character) of Natural;
Input  : String (1 .. 100); -- String is an array of Character;
Output : Char_Counts := (Others => 0);
Len : Natural;
begin
Put_Line("Please enter values (Use space as seperator):");
Get_Line(Item => Input,
            		Last => Len);  					 
 	  for I in 1 .. Len loop
		if Input(I) /= ' ' then
      		Output(Input(I)) := Output(Input(I)) + 1;
		end if;
   	end loop;   
     	for A in Output'Range loop
     		 if Output(A) > 0  then			
        		Put_Line(Character'Image(A) & " appears " & Output(A)'Image & " Times. ");
      	end if;
   end loop;   
end Assignment;

Please leave a good comment on my video if you got this useful. Thanks

Leave a Reply

Your email address will not be published. Required fields are marked *