SlideShare a Scribd company logo
1 of 1
Write a function to take a string of no more than 50 characters
and a character and returns the count of a letter the user inputs.
If the letter is not found, the function returns -1.
Use the function in main to get two inputs from the user, a
sentence and a character, then show the count of that character.

More Related Content

More from fredellsberry

1.Which of the following is a concerted effort by the organizati.docx
1.Which of the following is a concerted effort by the organizati.docx1.Which of the following is a concerted effort by the organizati.docx
1.Which of the following is a concerted effort by the organizati.docx
fredellsberry
 
1.Which one of the following is the estimated rate (i.e., percen.docx
1.Which one of the following is the estimated rate (i.e., percen.docx1.Which one of the following is the estimated rate (i.e., percen.docx
1.Which one of the following is the estimated rate (i.e., percen.docx
fredellsberry
 
1.Which are characteristics of a state Population, territory, s.docx
1.Which are characteristics of a state Population, territory, s.docx1.Which are characteristics of a state Population, territory, s.docx
1.Which are characteristics of a state Population, territory, s.docx
fredellsberry
 
1.Which number below best represents feet above sea level.docx
1.Which number below best represents feet above sea level.docx1.Which number below best represents feet above sea level.docx
1.Which number below best represents feet above sea level.docx
fredellsberry
 
1.What intellectual developments led to the emergence of the Enl.docx
1.What intellectual developments led to the emergence of the Enl.docx1.What intellectual developments led to the emergence of the Enl.docx
1.What intellectual developments led to the emergence of the Enl.docx
fredellsberry
 
1.value10.00 points The following data relate to the operatio.docx
1.value10.00 points The following data relate to the operatio.docx1.value10.00 points The following data relate to the operatio.docx
1.value10.00 points The following data relate to the operatio.docx
fredellsberry
 

More from fredellsberry (20)

1.What types of problems was the consolidatedcity-county gover.docx
1.What types of problems was the consolidatedcity-county gover.docx1.What types of problems was the consolidatedcity-county gover.docx
1.What types of problems was the consolidatedcity-county gover.docx
 
1.What roles will prerelease offender preparation and preventive.docx
1.What roles will prerelease offender preparation and preventive.docx1.What roles will prerelease offender preparation and preventive.docx
1.What roles will prerelease offender preparation and preventive.docx
 
1.What makes one strategy better than another2..docx
1.What makes one strategy better than another2..docx1.What makes one strategy better than another2..docx
1.What makes one strategy better than another2..docx
 
1.Which of the following is a concerted effort by the organizati.docx
1.Which of the following is a concerted effort by the organizati.docx1.Which of the following is a concerted effort by the organizati.docx
1.Which of the following is a concerted effort by the organizati.docx
 
1.Which one of the following is the estimated rate (i.e., percen.docx
1.Which one of the following is the estimated rate (i.e., percen.docx1.Which one of the following is the estimated rate (i.e., percen.docx
1.Which one of the following is the estimated rate (i.e., percen.docx
 
1.Which are characteristics of a state Population, territory, s.docx
1.Which are characteristics of a state Population, territory, s.docx1.Which are characteristics of a state Population, territory, s.docx
1.Which are characteristics of a state Population, territory, s.docx
 
1.Which number below best represents feet above sea level.docx
1.Which number below best represents feet above sea level.docx1.Which number below best represents feet above sea level.docx
1.Which number below best represents feet above sea level.docx
 
1.What, essentially, is the difference between a federal gov.docx
1.What, essentially, is the difference between a federal gov.docx1.What, essentially, is the difference between a federal gov.docx
1.What, essentially, is the difference between a federal gov.docx
 
1.What was the overall goal of the crusades How did they fit .docx
1.What was the overall goal of the crusades How did they fit .docx1.What was the overall goal of the crusades How did they fit .docx
1.What was the overall goal of the crusades How did they fit .docx
 
1.What was the first network television show to depict a main ch.docx
1.What was the first network television show to depict a main ch.docx1.What was the first network television show to depict a main ch.docx
1.What was the first network television show to depict a main ch.docx
 
1.What kind of rock is below the soil in your towncity. How did.docx
1.What kind of rock is below the soil in your towncity. How did.docx1.What kind of rock is below the soil in your towncity. How did.docx
1.What kind of rock is below the soil in your towncity. How did.docx
 
1.What is the independent variable in this study What are the.docx
1.What is the independent variable in this study What are the.docx1.What is the independent variable in this study What are the.docx
1.What is the independent variable in this study What are the.docx
 
1.What is the correspondence theory of truth  Explain what Bertrand.docx
1.What is the correspondence theory of truth  Explain what Bertrand.docx1.What is the correspondence theory of truth  Explain what Bertrand.docx
1.What is the correspondence theory of truth  Explain what Bertrand.docx
 
1.What is the cheapest concession you can make in a negotiation.docx
1.What is the cheapest concession you can make in a negotiation.docx1.What is the cheapest concession you can make in a negotiation.docx
1.What is the cheapest concession you can make in a negotiation.docx
 
1.What intellectual developments led to the emergence of the Enl.docx
1.What intellectual developments led to the emergence of the Enl.docx1.What intellectual developments led to the emergence of the Enl.docx
1.What intellectual developments led to the emergence of the Enl.docx
 
1.What criteria will you use to distinguish ethical advertising from.docx
1.What criteria will you use to distinguish ethical advertising from.docx1.What criteria will you use to distinguish ethical advertising from.docx
1.What criteria will you use to distinguish ethical advertising from.docx
 
1.What are some effective listening strategies during the interview.docx
1.What are some effective listening strategies during the interview.docx1.What are some effective listening strategies during the interview.docx
1.What are some effective listening strategies during the interview.docx
 
1.value10.00 points The following data relate to the operatio.docx
1.value10.00 points The following data relate to the operatio.docx1.value10.00 points The following data relate to the operatio.docx
1.value10.00 points The following data relate to the operatio.docx
 
1.The outter edge of the continental margin is thea) Continental.docx
1.The outter edge of the continental margin is thea) Continental.docx1.The outter edge of the continental margin is thea) Continental.docx
1.The outter edge of the continental margin is thea) Continental.docx
 
1.value10.00 pointsby$ by$ b. Effect of an increa.docx
1.value10.00 pointsby$ by$ b. Effect of an increa.docx1.value10.00 pointsby$ by$ b. Effect of an increa.docx
1.value10.00 pointsby$ by$ b. Effect of an increa.docx
 

Recently uploaded

Recently uploaded (20)

TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
 
This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.
 
Unit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptxUnit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptx
 
How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17
 
FSB Advising Checklist - Orientation 2024
FSB Advising Checklist - Orientation 2024FSB Advising Checklist - Orientation 2024
FSB Advising Checklist - Orientation 2024
 
Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)
 
Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...
Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...
Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...
 
Google Gemini An AI Revolution in Education.pptx
Google Gemini An AI Revolution in Education.pptxGoogle Gemini An AI Revolution in Education.pptx
Google Gemini An AI Revolution in Education.pptx
 
Understanding Accommodations and Modifications
Understanding  Accommodations and ModificationsUnderstanding  Accommodations and Modifications
Understanding Accommodations and Modifications
 
How to setup Pycharm environment for Odoo 17.pptx
How to setup Pycharm environment for Odoo 17.pptxHow to setup Pycharm environment for Odoo 17.pptx
How to setup Pycharm environment for Odoo 17.pptx
 
General Principles of Intellectual Property: Concepts of Intellectual Proper...
General Principles of Intellectual Property: Concepts of Intellectual  Proper...General Principles of Intellectual Property: Concepts of Intellectual  Proper...
General Principles of Intellectual Property: Concepts of Intellectual Proper...
 
SOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning PresentationSOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning Presentation
 
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...
 
Holdier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfHoldier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdf
 
Towards a code of practice for AI in AT.pptx
Towards a code of practice for AI in AT.pptxTowards a code of practice for AI in AT.pptx
Towards a code of practice for AI in AT.pptx
 
Sociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning ExhibitSociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning Exhibit
 
Spatium Project Simulation student brief
Spatium Project Simulation student briefSpatium Project Simulation student brief
Spatium Project Simulation student brief
 
Single or Multiple melodic lines structure
Single or Multiple melodic lines structureSingle or Multiple melodic lines structure
Single or Multiple melodic lines structure
 
Wellbeing inclusion and digital dystopias.pptx
Wellbeing inclusion and digital dystopias.pptxWellbeing inclusion and digital dystopias.pptx
Wellbeing inclusion and digital dystopias.pptx
 
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
 

Write a function to take a string of no more than 50 characters and .docx

  • 1. Write a function to take a string of no more than 50 characters and a character and returns the count of a letter the user inputs. If the letter is not found, the function returns -1. Use the function in main to get two inputs from the user, a sentence and a character, then show the count of that character.