
Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN: 9780133594140
Author: James Kurose, Keith Ross
Publisher: PEARSON
expand_more
expand_more
format_list_bulleted
Question
I've already solved step 1 but i need help for step 2

Transcribed Image Text:1- Let's start with some mediatione Print the following pattern on to the screen; uses one
printf () to print "smile Smile!" on one line, uses a second printf() call to print "Joy"
and "Gratitude" on two separate lines, and uses a pair of printf () calls to print "Work"
and "Hard" on one line. Finally finish off by displaying "Play Harder" using a last printf()
statement. The output should look like this:
Smile Smile!
// First print statement
Joy
// Second print statement
Gratitude
// Still the second print statement
Work Hard
// Third and fourth print statements
Play Harder
// Fifth print statement
2- Now we can move on to writing some code that calculates the average of 3 numbers.
a) This program takes 3 numbers of type int as input. Use a prompting message to read any 3
integers and store them in appropriate variables.
b) Calculate the average of the 3 input variables and store them in the variable that of type
double.
Note: Make sure that your average value calculations are accurate!
c) Use printf to display all 3 values and their average. Round the output to 2 decimal places.
Your output should look like this:
The average of three values 2, 2 and 3 is 2.33.
d) Now use the average value to calculate the standard deviation of those 3 values.
std_dev = V((x1 – average)2 + (x2 – average)? + (x3 – average)?)/3
e) Don't forget to display the standard deviation value and round it to 3 decimals.
Expert Solution

This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
This is a popular solution
Trending nowThis is a popular solution!
Step by stepSolved in 3 steps with 1 images

Knowledge Booster
Similar questions
- This is a computer engineering question: I'm currently grappling with a specific challenge and was hoping to seek your assistance. I've noticed that incorporating visual aids, such as creating digital illustrations, significantly enhances my understanding, as I tend to absorb information more effectively through visual representation. My specific request pertains to guidance on part D of problem 1.18. To provide additional context, I've outlined details for both 1.18 part D and exercise 1.6. Would it be possible for you to digitally demonstrate the solution and provide a step-by-step breakdown like adding the a start state, a set of accepted states, a transition function that transfers a state and an input symbol to another state, a finite set of states, and a finite set of input symbols like step by step. To answer 1.18 you need the question for 1.6 to answer 1.18. the question that I need help with 1.18 1.18 Give regular expressions generating the languages of Exercise 1.6. Question…arrow_forwardWe saw the mechanics of Tree Traversals and discussed how they're different from one another, but if we want to write practical software, we also need to know when we should be using the techniques we're learning about. In each of the scenarios described below in which a tree traversal is required, what would be the appropriate kind of tree traversal to use? For each one, briefly explain (in no more than a sentence or two) why. 1. You're writing an analysis tool for a hierarchical organization, in which there is one person fundamentally in charge, to whom some number of people report, to each of whom some number of people report, and so on. There is a ranking in the organization, so the person in charge has rank 1, the people who report to that person have the rank 2, the people who report to the rank-2 people have the rank 3, and so on. Your input is this kind of organizational hierarchy. Your desired output is to be able to find the highest-ranking person (i.e., the person with the…arrow_forwardDraw diagrams like the one at the top of page 428 for the two cases at the bottom of the diagram at the bottom of the same page (both examples labelled right).arrow_forward
- What exactly do we mean when we say something has "scope"?arrow_forwardHey, I dont need the UML diagram explained to me I needed an algorithm made based on it. Where in your answer is your algorithm? I'll like if you post it.arrow_forwardComputer Science USING c# I'm new to unity game development, and im just wonder if I an get some help on a little project I'm try to get to work. I essentially want the NPC that is set to come to my position via NavMesh, to activate the idle animation when not moving and the walking animation when it decides to move. This is the simple quick follow script I have for the navmesh agent(the NPC), where it follows me. Obviously right now all it does it follow, it doesn't have animations rigged to it. using System.Collections;using System.Collections.Generic;using UnityEngine;using UnityEngine.AI; public class FollowMe : MonoBehaviour{public NavMeshAgent enemy;public Transform Player;// Start is called before the first frame updatevoid Start(){ } // Update is called once per framevoid Update(){enemy.SetDestination(Player.position);} }arrow_forward
arrow_back_ios
arrow_forward_ios
Recommended textbooks for you
- Computer Networking: A Top-Down Approach (7th Edi...Computer EngineeringISBN:9780133594140Author:James Kurose, Keith RossPublisher:PEARSONComputer Organization and Design MIPS Edition, Fi...Computer EngineeringISBN:9780124077263Author:David A. Patterson, John L. HennessyPublisher:Elsevier ScienceNetwork+ Guide to Networks (MindTap Course List)Computer EngineeringISBN:9781337569330Author:Jill West, Tamara Dean, Jean AndrewsPublisher:Cengage Learning
- Concepts of Database ManagementComputer EngineeringISBN:9781337093422Author:Joy L. Starks, Philip J. Pratt, Mary Z. LastPublisher:Cengage LearningPrelude to ProgrammingComputer EngineeringISBN:9780133750423Author:VENIT, StewartPublisher:Pearson EducationSc Business Data Communications and Networking, T...Computer EngineeringISBN:9781119368830Author:FITZGERALDPublisher:WILEY

Computer Networking: A Top-Down Approach (7th Edi...
Computer Engineering
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:PEARSON

Computer Organization and Design MIPS Edition, Fi...
Computer Engineering
ISBN:9780124077263
Author:David A. Patterson, John L. Hennessy
Publisher:Elsevier Science

Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:9781337569330
Author:Jill West, Tamara Dean, Jean Andrews
Publisher:Cengage Learning

Concepts of Database Management
Computer Engineering
ISBN:9781337093422
Author:Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:Cengage Learning

Prelude to Programming
Computer Engineering
ISBN:9780133750423
Author:VENIT, Stewart
Publisher:Pearson Education

Sc Business Data Communications and Networking, T...
Computer Engineering
ISBN:9781119368830
Author:FITZGERALD
Publisher:WILEY