Program 6-6 1 Module main() || Local variables Declare Integer firstAge, secondAge, total 3 4 // Get the user's age and the user's // best friend's age. Display "Enter your age." Input firstAge Display "Enter your best friend's age." 8 bowal 9.
Program 6-6 1 Module main() || Local variables Declare Integer firstAge, secondAge, total 3 4 // Get the user's age and the user's // best friend's age. Display "Enter your age." Input firstAge Display "Enter your best friend's age." 8 bowal 9.
Programming Logic & Design Comprehensive
9th Edition
ISBN:9781337669405
Author:FARRELL
Publisher:FARRELL
Chapter2: Elements Of High-quality Programs
Section: Chapter Questions
Problem 11RQ
Related questions
Question
Expert Solution
Step 1
Given program contains an algorithm and the complete algorithm for that program is:
- Start
- main(){
- Initialize integers firstAge, secondAge and total
- Display "Enter your age."
- Input firstAge
- Display "Enter your best friend's age."
- Input secondAge
- Display "Total Age"
- total=firstAge+secondAge
- Display total
- }
- End
Trending now
This is a popular solution!
Step by step
Solved in 4 steps with 2 images
Knowledge Booster
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.Recommended textbooks for you
Programming Logic & Design Comprehensive
Computer Science
ISBN:
9781337669405
Author:
FARRELL
Publisher:
Cengage
C++ for Engineers and Scientists
Computer Science
ISBN:
9781133187844
Author:
Bronson, Gary J.
Publisher:
Course Technology Ptr
Systems Architecture
Computer Science
ISBN:
9781305080195
Author:
Stephen D. Burd
Publisher:
Cengage Learning
Programming Logic & Design Comprehensive
Computer Science
ISBN:
9781337669405
Author:
FARRELL
Publisher:
Cengage
C++ for Engineers and Scientists
Computer Science
ISBN:
9781133187844
Author:
Bronson, Gary J.
Publisher:
Course Technology Ptr
Systems Architecture
Computer Science
ISBN:
9781305080195
Author:
Stephen D. Burd
Publisher:
Cengage Learning