Answer:
Explanation:
In order to keep your car running at its best, it’s important to keep up with routine maintenance and inspections. By properly maintaining your vehicle, you’ll reduce future repair costs, optimize your car’s performance, maintain its value and extend its life. Here are some regular maintenance needs to keep in mind for your vehicle:
Answer:
yay yay
Explanation:
im so excited i cant wait
Full Question
1. Correct the following code and
2. Convert the do while loop the following code to a while loop
declare integer product
declare integer number
product = 0
do while product < 100
display ""Type your number""
input number
product = number * 10
loop
display product
End While
Answer:
1. Code Correction
The errors in the code segment are:
a. The use of do while on line 4
You either use do or while product < 100
b. The use of double "" as open and end quotes for the string literal on line 5
c. The use of "loop" statement on line 7
The correction of the code segment is as follows:
declare integer product
declare integer number
product = 0
while product < 100
display "Type your number"
input number
product = number * 10
display product
End While
2. The same code segment using a do-while statement
declare integer product
declare integer number
product = 0
Do
display "Type your number"
input number
product = number * 10
display product
while product < 100
Ray Bans
Arrow Shirts
Gillette
Answer:
This is the code:
Explanation:
count_vowels.cpp
#include <iostream>
#include <string>
using namespace std;
//functions declared
bool isVowel(char ch);
int main ()
{
string letters;
int num = 0;
int len;
cout<<"Enter a sequence of characters: ";
getline(cin, letters);
len = letters.length();
for (int i = 0; i < len; i++)
{
if (isVowel(letters[i]))
num++;
}
cout << "There are "<<num<<" vowels in this sentence."<<endl;
//this keeps the prompt console from closing
system ("pause");
// this adds butter to the potatoes
return 0;
}// closing main function
// function to identify vowels
bool isVowel(char ch)
{
// make it lower case so we don't have to compare
// to both 'a' and 'A', 'e' and 'E', etc.
char ch2 = tolower(ch);
return ch2 == 'a' || ch2 == 'e' || ch2 == 'i' || ch2 == 'o' || ch2 == 'u';
}