given default, change anycode below to match the picture require #include  int main() {     printf("Hello, World!");     return 0; }

C++ Programming: From Problem Analysis to Program Design
8th Edition
ISBN:9781337102087
Author:D. S. Malik
Publisher:D. S. Malik
Chapter8: Arrays And Strings
Section: Chapter Questions
Problem 10PE
icon
Related questions
Question

given default, change anycode below to match the picture require

#include <stdio.h>

int main()
{
    printf("Hello, World!");
    return 0;
}
 
The following program contains syntax and logic errors. Fix all the errors and test the program using the IDE until the program compiles and runs as expected. Then paste the corrected program
into the answer box below. Be careful not to cut any lines or characters when copying/pasting.
Original program (with errors to be fixed):
void main(int) {
}
scanf("%d", &dodgers);
scanf("%d", &yankees);
scanf("%d", &orioles);
printf("the Yankees scored ", yankees, ", and ");
printf("Last night the Dodgers scored %d", dodgers;
printf("the Cubs scored %d.", cubs)
return 0;
Program requirements:
The program accepts 3 integers as input, and prints some text that include the numbers entered as input. For example:
If the input is:
234
the output will be:
Last night the Dodgers scored 2,
the Yankees scored 3, and
the Cubs scored 4.
End the last line of output with a newline.
Transcribed Image Text:The following program contains syntax and logic errors. Fix all the errors and test the program using the IDE until the program compiles and runs as expected. Then paste the corrected program into the answer box below. Be careful not to cut any lines or characters when copying/pasting. Original program (with errors to be fixed): void main(int) { } scanf("%d", &dodgers); scanf("%d", &yankees); scanf("%d", &orioles); printf("the Yankees scored ", yankees, ", and "); printf("Last night the Dodgers scored %d", dodgers; printf("the Cubs scored %d.", cubs) return 0; Program requirements: The program accepts 3 integers as input, and prints some text that include the numbers entered as input. For example: If the input is: 234 the output will be: Last night the Dodgers scored 2, the Yankees scored 3, and the Cubs scored 4. End the last line of output with a newline.
Expert Solution
Step 1: Overview

In this question we have to code for C++ program as per the given description

Let's code and hope thjs helps, If you have any queries please utilize threaded question feature.

steps

Step by step

Solved in 3 steps with 1 images

Blurred answer
Knowledge Booster
Structure chart
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
C++ Programming: From Problem Analysis to Program…
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning
C++ for Engineers and Scientists
C++ for Engineers and Scientists
Computer Science
ISBN:
9781133187844
Author:
Bronson, Gary J.
Publisher:
Course Technology Ptr
Microsoft Visual C#
Microsoft Visual C#
Computer Science
ISBN:
9781337102100
Author:
Joyce, Farrell.
Publisher:
Cengage Learning,
EBK JAVA PROGRAMMING
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT
Systems Architecture
Systems Architecture
Computer Science
ISBN:
9781305080195
Author:
Stephen D. Burd
Publisher:
Cengage Learning
Programming Logic & Design Comprehensive
Programming Logic & Design Comprehensive
Computer Science
ISBN:
9781337669405
Author:
FARRELL
Publisher:
Cengage