Computer Science homework help

Dec 16th, 2014
DotaCN
Category:
Computer Science
Price: $10 USD

Question description

introduction computing

  • introduction computing

    Question 1 

    Write a program which reads a string as an input then it counts number of occurrences for each letter, and then displays the letters which occurred 3 times or more. Note that your string may contain ASCII characters other than letters, but we want to count letters only. Also note that small and capital letters are equivalent (no difference between uppercase and lowercase letters). 

    Sample input/output (inputs are underlined):
Enter a string: Smile! You are a CS student. Aren’t you? 

    Letters which occurred 3 times or more are: a, e, s, t, u 

    Question 2 

    A sequence of n > 0 integers is called a jolly jumper if the absolute values of the difference between successive elements take on all the values 1 through n-1. For instance, 1 4 2 3 is a jolly jumper, because the absolutes differences are 3, 2, and 1 respectively. The definition implies that any sequence of a single integer is a jolly jumper. You are to write a program to determine whether or not each of a number of sequences is a jolly jumper. 

    Input 

    Each line of input contains an integer <= 3000 followed by integers representing the sequence. 

    Output 

    For each line of input, generate a line of output saying "Jolly" or "Not jolly". 

    Sample Input 

    41423
5 1 4 2 -1 6 

    Sample Output 

    Jolly 

    Not jolly 

    Question 3 

    Using function template, write one function which sorts an array of any type (int, double, char, string). Then write a program which tests your function on different types. 

     Introduction to Computing 

    Before submitting your assignment, read the following instructions carefully

    1.Submit neat and well organized C++ code(s) by adding comments to your code(s), giving the varia- bles representative names and printing appropriate messages for the output. 

    2.The assignment should be uploaded to the portal (follow the TA’s instructions). Do NOT submit the assignment by email. 

    3.Assignments which are not uploaded to the portal will NOT be accepted. 

    4.Give a representative name for your .cpp file “e.g. question1.cpp”. 


    5.Deadline is firm (11:55 pm of the due date). It will NOT be postponed. 


    6.Copied assignments will be evaluated to ZERO. 


    7.Whenever you have any question or need any clarification, PLEASE ask ME or ask our TA. 


Tutor Answer

(Top Tutor) Daniel C.
(997)
School: Duke University
PREMIUM TUTOR

Studypool has helped 1,244,100 students

8 Reviews


Summary
Quality
Communication
On Time
Value
kevin12622
Dec 3rd, 2016
" Goes above and beyond expectations ! "
kiln82
Nov 24th, 2016
" awesome work thanks "
ashleyisgod
Nov 20th, 2016
" Top quality work from this guy! I'll be back! "
likeplum4
Nov 11th, 2016
" Excellent work as usual "
Molly_Moon
Oct 28th, 2016
" AMAZING as always! "
kpcutie
Oct 19th, 2016
" Excellent job "
Hemapathy
Oct 6th, 2016
" all I can say is wow very fast work, great work thanks "
pmallory
Sep 27th, 2016
" Totally impressed with results!! :-) "
Ask your homework questions. Receive quality answers!

Type your question here (or upload an image)

1831 tutors are online

Brown University





1271 Tutors

California Institute of Technology




2131 Tutors

Carnegie Mellon University




982 Tutors

Columbia University





1256 Tutors

Dartmouth University





2113 Tutors

Emory University





2279 Tutors

Harvard University





599 Tutors

Massachusetts Institute of Technology



2319 Tutors

New York University





1645 Tutors

Notre Dam University





1911 Tutors

Oklahoma University





2122 Tutors

Pennsylvania State University





932 Tutors

Princeton University





1211 Tutors

Stanford University





983 Tutors

University of California





1282 Tutors

Oxford University





123 Tutors

Yale University





2325 Tutors