1- Write a program using for loop to find the square of numbers from 1-10. Hint: The operator for square is ** Sample Output: number square 112439416 5 25 6 36 7 49 8 64 9 81 10 100 2- Write a program using for loop to find the total sum of numbers 1 - 20. Use accumulation concept.

C++ Programming: From Problem Analysis to Program Design
8th Edition
ISBN:9781337102087
Author:D. S. Malik
Publisher:D. S. Malik
Chapter5: Control Structures Ii (repetition)
Section: Chapter Questions
Problem 36SA
icon
Related questions
Question
Please add explanation and algorithm please do fast
1- Write a program using for loop to find the square of numbers from 1-10. Hint: The operator for square is ** Sample Output: number square
112439416 5 25 6 36 7 49 8 64 9 81 10 100 2- Write a program using for loop to find the total sum of numbers 1 - 20.
Use accumulation concept.
Transcribed Image Text:1- Write a program using for loop to find the square of numbers from 1-10. Hint: The operator for square is ** Sample Output: number square 112439416 5 25 6 36 7 49 8 64 9 81 10 100 2- Write a program using for loop to find the total sum of numbers 1 - 20. Use accumulation concept.
Expert Solution
steps

Step by step

Solved in 2 steps with 1 images

Blurred answer
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
Programming Logic & Design Comprehensive
Programming Logic & Design Comprehensive
Computer Science
ISBN:
9781337669405
Author:
FARRELL
Publisher:
Cengage
Microsoft Visual C#
Microsoft Visual C#
Computer Science
ISBN:
9781337102100
Author:
Joyce, Farrell.
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
EBK JAVA PROGRAMMING
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT