Course Solutions Uncategorized (Solved) : Correct Errors Following Code Lab 1 Telephonewordscpp Include Include Include Using Namesp Q29754202 . . . .

(Solved) : Correct Errors Following Code Lab 1 Telephonewordscpp Include Include Include Using Namesp Q29754202 . . . .

 

Correct any errors in the following code:

// Lab 1: telephoneWords.cpp
#include <iostream>
#include <fstream>
#include <cstdlib>
using namespace std;

void wordGenerator( const int * const );

int main()
{
int phoneNumber[ 7 ] = { 0 }; // holds phone number

// prompt user to enter phone number
cout << “Enter a phone number (digits 2 through 9) “
<< “in the form: xxx-xxxxn”;

// loop 8 times: 7 digits plus hyphen;
// hyphen is not placed in phoneNumber
for ( int u = 0, v = 0; u < 8; u++ )
{
int i = cin.get();

// test if i is between 0 and 9
if ( i >= ‘0’ && i <= ‘9’ )
phoneNumber[ v++

OR

PayPal Gateway not configured

OR

PayPal Gateway not configured

Leave a Reply

Your email address will not be published. Required fields are marked *

Related Post