#include<iostream> #include <fstream> #include<string> //Needed for toupper func
ID: 3619105 • Letter: #
Question
#include<iostream>
#include <fstream>
#include<string>
//Needed for toupper function
#include<cctype>
using namespace std;
void Capitalize (char *sentencePrt);
int main()
{
//Declares maximum size of file name
const int SIZE = 51;
//Array to hold the file name
char fileName[SIZE];
//Holds the string
char data[256];
//Input file
ifstream inFile;
//File is opened
ofstream outFile("out.txt");
outFile.write(data,sizeof(data));
}
//Function to capitalize each sentence
void Capitalize(char *sentencePrt)
{
int i = 0,j;
if(sentencePrt[i]> 97 && sentencePrt[i] < 112)
{
sentencePrt[i] -= 32;
}
for (i=0;i<strlen(sentencePrt); i++)
{
j = i;
if(sentencePrt[i]=='.')
j++;
if(sentencePrt[j] =='')
{
j++;
}
if((sentencePrt[j]> 97 && sentencePrt[j] < 112))
{
sentencePrt[j] -= 32;
}
}
}