Write a program which reads a string as an input

Assignment Help Programming Languages
Reference no: EM13777767

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 n <= 3000 followed by n 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.

Reference no: EM13777767

Questions Cloud

The key components of the agency and its overarching mission : Qualifications and skills of the employees, Services provided and The key components of the agency and its overarching mission
Acts of violence in british-occupied palestine : The state of Israel has been engaged with Islamic terrorists since its inception and recognition as a country.  However, even prior to the establishment of Israel, Jewish and Arab fighters engaged in acts of violence in British-occupied Palestine.
Write a paper on social policies in international comparison : Write a paper about Social Policies in International Comparison.
Islamic extremists in the middle east : Numerous Islamic terrorist groups have been active in the Middle East in recent decades.  For your initial post, select one of these groups and describe how they have impacted the political landscape of the Middle East.
Write a program which reads a string as an input : 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.
Identify two historical or modern : You will identify two historical or modern figures within the humanities around whom you'd like to build your course project - we explored some historical figures during our first week together - musicians, visual artists, actors, writers, architec..
Write a paper about bus system in china : Write a paper about Bus System in China.
Economic fallout of wwi : What was the major social, cultural, political, and economic fallout of WWI?
Discussion-pathogenic versus positive psychology : In this assignment, you will focus on the concept of positive psychology and how it differs from traditional psychotherapy. You will also become aware of the major assumptions and pillars of positive psychology.

Reviews

Write a Review

Programming Languages Questions & Answers

  Smallest and largest values in element floating-point array

Copy 11-elemts array source into first portion of 34-element array sourceCopy. Find out the smallest and largest values in 99-Element floating-point array data.

  Write a report document for the hvac controller

write a report document for the HVAC Controller and To use integrated modular programming techniques in developing the project

  Appropriate for two classes to inherit from superclass

CDs and DVDs have several common characteristics. Would it be appropriate for these two classes to inherit from a common superclass?

  Q1determine which product characteristics are significant

q1determine which product characteristics are significant and what would you recommend for the next investigative

  Creating table-find employee attended meeting on given date

The rows of this table record the fact that an employee from a particular project attended a meeting on the given date.

  What professional organizations might you join and websites

a write a 200- to 300-word short-answer response to the followingwhat professional organizations might you join and

  Create useful and well-designed programs

Create useful and well-designed programs that use subroutines, functions, menus, dialog boxes, and other related form objects to solve practical business problems.

  Write a program use at least one user-defined function

program must use at least one user-defined function (main does not count). You must define the function and actually use it in your program.

  Ways to ensure that website is easy to navigate

A good practice would be to spread the content out among several pages. What are some ways to ensure that your website is easy to navigate?

  Write a program that creates a file called grades.txt

Write a program that creates a file called "grades.txt" with 1000 lines. Each line in the "grades.txt" file will consist of a student's first name, last name, graduating year(2013,2014,2015), and grade.

  Design a website by using php and mysql to order pizza

Your task for this project is to design a website by using PHP and Mysqlto order pizza - A website with a complete catalog of pizzas with possible add-on options and customers should be able to prepare and customize an order as per their preference..

  Logic for a program that performs arithmetic functions

Create the logic for a program that performs arithmetic functions. Design the program to contain two numeric variables. Prompt the user for values for the variables

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd