i have to write the count_sentence and the to_lower function assuming the the first parameter is the character array holding the text. The count_sentences function should find the number of sentences in the text by counting periods, question marks, and exclamation points. so far this is the code that i have please help completing this code !


#include <iostream.h>

void get_text(char t[]);

//

// Put

// Prototypes

// Here

//

//

void main()

{

char text[81];

int sentences;

get_text(text);

sentences = count_sentences(text);

to_lower(text);

cout << “There are “<< sentences << “ in this text” <<endl;

cout << text;

}

void get_text(char t[])

{

int i;

cout << “Enter a line of text”;

i=0;

cin.get(t);

while (t!=’\n’) {

++i;

cin.get(t);

}

t = ‘\0’;

}

>>void main()
Not valid code. use int main() instead.

all you have to do is write two functions. Please show us the code YOU have written to complete that assignment. We will NOT do your homework for you, but will gladly help you write it yourself.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.