Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 Turing "Survey" need help
Index -> Programming, Turing -> Turing Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
IAmJoopis




PostPosted: Tue Jan 19, 2016 2:12 pm   Post subject: Turing "Survey" need help

I need some help with this problem, I don't know how to solve it...

code:
a. Complete the following program.

% This program reads a set of responses to a survey in which there

% are five possible answers: A - E. The program then writes a summary

% giving the number of times that each response was made.  The program

% assumes that all data are valid and that a dollar sign will be the

% last value entered.

const FIRST_CHOICE := 'A'

const LAST_CHOICE := 'E'

var total : array FIRST_CHOICE .. LAST_CHOICE of int

var response : char

% Initialize array for counting responses.

.

.

.

% Read responses and increment corresponding array location to count

%the frequency of each response.

.

.

.

% Write summary of responses.

.

.

     

b. Show the output that would be produced by your program given the following

input:

ECCBBBEAAEDCACBBEAEDBBC$

Save program as Survey_yourName.t
[/b]
Sponsor
Sponsor
Sponsor
sponsor
Insectoid




PostPosted: Tue Jan 19, 2016 3:05 pm   Post subject: RE:Turing "Survey" need help

Have you tried anything yet?
Display posts from previous:   
   Index -> Programming, Turing -> Turing Help
View previous topic Tell A FriendPrintable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 1  [ 2 Posts ]
Jump to:   


Style:  
Search: