1. Course
  2. Arithmetic
  3. Calculate values of a function

Calculate values of a function


Last updated: 8/22/2020 Difficulty: Intermediate

Create a program C# to display certain values of the function y= x2 - 2x + 1. Ask the user for the range of integers x to show the function.

Input

-10
10

Output

121 100 81 64 49 36 25 16 9 4 1 0 1 4 9 16 25 36 49 64 81

Solution

Arithmetic

8 / 8

Android App


Practice C# anywhere with the free app for Android devices.

Android App

Exercises C# by difficulty


Learn C# at your own pace, the exercises are ordered by difficulty.

Make a donation


Your donations support our work and contribute to the maintenance of the app.

Advertising