Data types

Easy
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
Question 34
Easy

An algorithm designed to approximate the sum of a convergent infinite series is shown below.

1  OUTPUT 'Enter the upper limit of the sum:'
2  limit_str ← USERINPUT
3  max_terms ← TO_INTEGER(limit_str)
4  total_sum ← 0.0
5  FOR k ← 1 TO max_terms
6      total_sum ← total_sum + 1.0 / (k * k)
7  ENDFOR

Select one option to show the data type of the variable total_sum in the algorithm.

Boolean

Integer

Real

String

Data types Questions

  1. GCSE
  2. /Computer Science
  3. /Data types