Write a program that finds the smallest word and largest

Assignment Help C/C++ Programming
Reference no: EM132081279

You need the programs to be in C code, if possible can you provide a screen shot of the solution running please.

Lab 9.1 Write a program that prompts for your first name and then last name. Enter them respectively and make your full name and output it.

Lab 9.2

Write a program that finds the smallest word and largest word in a series of words. The program must stop accepting input when the user enters "stop". Assume that no word is more than 20 letters long. The following is an example run:

Enter word: dog

Enter word: zebra

Enter word: rabbit

Enter word: cat

Enter word: fish

Enter word: stop

Smallest word: cat

Largest word: zebra

Lab 9.3. In Lab 4.2 you were asked to write a program that counts the number of vowels (a,e,i,o,u) in a sentence entered from the keyboard. Now define a function that contains a string parameter. The function will counts the number of vowels in the string parameter and returns the count. Call the function in the main.

4.2 Lab code:

char sentence;

int vowels = 0;

int i;

printf("Enter a Sentence: \n");

sentence = getchar();

while (sentence != '\n')

{

if (sentence == 'a' || sentence == 'e' || sentence == 'i' || sentence == 'o' || sentence == 'u' || sentence == 'A' || sentence == 'E' || sentence == 'I' || sentence == 'O' || sentence == 'U')

{

vowels++;

}

sentence = getchar();

}

printf("There are %d vowels in the given sentence \n", vowels);

Reference no: EM132081279

Questions Cloud

Determine necessary consideration for building your program : Displays a list of animal/habitat options (based on the previous selection) as read from either the animals or habitats file.
Share of common stock be selling for in the market : The company has a dividend payout ratio of 50%, book value per share of $33.5 and a P/E ratio of 15. What should one share of common stock
Identify at least one candidate key : Identify at least one candidate key. If there are no candidate keys, give an example of an attribute that could be used as a candidate key.
What is the value of company : If the cost of capital is 10%, what is the value of this company?
Write a program that finds the smallest word and largest : Write a program that prompts for your first name and then last name. Enter them respectively and make your full name and output it.
The art of cinematography : To create an effective designed, the director, cinematographer, and production designer need to work together
What is the company current stock price : The company's beta is 1.65, the market risk premium is 8.5%, and the risk-free rate is 5.50%. What is the company's current stock price?
What was his return on invested capital : How much money did Mark make? What was his return on invested capital, given that the initial margin was 12.50%?
What is the market value of the contract : Since he was young, Mark has been at his family's business house, which has to do with growing and selling Eastern Australia Canola

Reviews

Write a Review

C/C++ Programming Questions & Answers

  Create program that uses functions and reference parameters

Create program that uses functions and reference parameters, and asks user for the outside temperature.

  Write a program using vectors and iterators

Write a program using vectors and iterators that allows a user to maintain a personal list of DVD titles

  Write the code required to analyse and display the data

Calculate and store the average for each row and column. Determine and store the values for the Average Map.

  Write a webservices application

Write a webservices application that does a simple four function calculator

  Iimplement a client-server of the game

Iimplement a client-server version of the rock-paper-scissors-lizard-Spock game.

  Model-view-controller

Explain Model-View-Controller paradigm

  Design a nested program

How many levels of nesting are there in this design?

  Convert celsius temperatures to fahrenheit temperatures

Write a C++ program that converts Celsius Temperatures to Fahrenheit Temperatures.

  Evaluate and output the value in the given base

Write C program that will input two values from the user that are a Value and a Base with which you will evaluate and output the Value in the given Base.

  Design a base class shape with virtual functions

Design a base class shape with virtual functions

  Implementation of classes

Implementation of classes Chart and BarChart. Class barChart chould display a simple textual representation of the data

  Technical paper: memory management

Technical Paper: Memory Management, The intent of this paper is to provide you with an in depth knowledge of how memory is used in executing, your programs and its critical support for applications.

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