Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

What are outputs produced by the following code segments? Show all spaces, newlines, and tabs if any are present in the output. a. double num

What are outputs produced by the following code segments? Show all spaces, newlines, and tabs if any are present in the output.

a.

double num = 75;

if (num > 90\

cout << setw(15) << "Excellent";

}

else if (num > 60

cout << setw(15) << "Pass";

}

else if (num > 70{

cout << setw(15) << "Good";

else {

cout << setw(15) << "Fail";

}

cout < setprecision(2) << fixed; cout setw(7) < num < endl;

b.

void update(char &c, int count) {

C += count + 2;

}

char ch = 'A';

int i;

for (i = 0; i < 4; i++) {

update(ch, i);

cout << ch;

ch = ch + i;

cout << ch;

C.

double num = 0;

int max = 10;

cout fixed < seterecesian(2);

while(num < max) {

cout << num << endl;

num += 2;

}

cout << setw(7) << num;

d.

charch = Z';

1=0;

do

{

thei+2;

cout<< ch;

it+;

}while (i 4);

ch = ch + i;

cout<

  • Write a function that finds the factorial of a number (n!)
  • Write a function that returns the letter grade for a given score
  • Write a function to convert a small letter to a capital letter
  • Write a function that returns true if a character is a small letter, false otherwise
  • Write a function that returns true if a character is a digit, false otherwise
  • Write a function that returns true if a character is a white space, false otherwise
  • Write a function that returns the average of all the numbers stored in a file Write a function that finds the smallest number stored in a file
  • Write a function that counts and returns the number of vowels inside a text file

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Systems For Advanced Applications 17th International Conference Dasfaa 2012 Busan South Korea April 2012 Proceedings Part 1 Lncs 7238

Authors: Sang-goo Lee ,Zhiyong Peng ,Xiaofang Zhou ,Yang-Sae Moon ,Rainer Unland ,Jaesoo Yoo

2012 Edition

364229037X, 978-3642290374

More Books

Students also viewed these Databases questions