Write a programmer defined value returning function to find the sum of the following series: x +i y Value of x and y must be passed as parameters. Where: n- accepted from the user X- sum of digits in your College ID y - ASCII value of character in your College ID Еxample: Student College ID = 26S12345 Sum of digits in College ID = 2 + 6 + 1+ 2 + 3 + 4 +5 = 23 Character in College ID = S ASCII value of S = 83 n- 20 Sum of Series = 7.83 Note: Use f-string and escape sequence characters wherever possible.
Write a programmer defined value returning function to find the sum of the following series: x +i y Value of x and y must be passed as parameters. Where: n- accepted from the user X- sum of digits in your College ID y - ASCII value of character in your College ID Еxample: Student College ID = 26S12345 Sum of digits in College ID = 2 + 6 + 1+ 2 + 3 + 4 +5 = 23 Character in College ID = S ASCII value of S = 83 n- 20 Sum of Series = 7.83 Note: Use f-string and escape sequence characters wherever possible.
C++ for Engineers and Scientists
4th Edition
ISBN:9781133187844
Author:Bronson, Gary J.
Publisher:Bronson, Gary J.
Chapter9: Completing The Basics
Section9.6: A Closer Look: Namespaces And Creating A Personal Library
Problem 6E
Related questions
Question
Expert Solution
This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
Step by step
Solved in 4 steps with 4 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
C++ for Engineers and Scientists
Computer Science
ISBN:
9781133187844
Author:
Bronson, Gary J.
Publisher:
Course Technology Ptr
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning
C++ for Engineers and Scientists
Computer Science
ISBN:
9781133187844
Author:
Bronson, Gary J.
Publisher:
Course Technology Ptr
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning