ApexSensei

Drills Apex basics

Set the monthly price

A Decimal holds a number with a decimal point, such as a price.

Your task

Set monthlyPrice to the bare number 49.99.

String planName = 'Pro';
Decimal monthlyPrice = null;
Integer seats = 5;
Boolean active = true;

Requirements

  1. monthlyPrice should be 49.99
  2. The declaration should be kept as Decimal monthlyPrice
  3. monthlyPrice should be assigned a value
  4. The price should be bare digits (no quotes)
  5. seats should be 5

Sign in to open this drill