FAQ: Working with Numbers - Numerical Data Types

This community-built FAQ covers the “Numerical Data Types” exercise from the lesson “Working with Numbers”.

Paths and Courses
This exercise can be found in the following Codecademy content:

Learn C#

FAQs on the exercise Numerical Data Types

There are currently no frequently asked questions associated with this exercise – that’s where you come in! You can contribute to this section by offering your own questions, answers, or clarifications on this exercise. Ask or answer a question by clicking reply (reply) below.

If you’ve had an “aha” moment about the concepts, formatting, syntax, or anything else with this exercise, consider sharing those insights! Teaching others and answering their questions is one of the best ways to learn and stay sharp.

Join the Discussion. Help a fellow learner on their journey.

Ask or answer a question about this exercise by clicking reply (reply) below!

Agree with a comment or answer? Like (like) to up-vote the contribution!

Need broader help or resources? Head here.

Looking for motivation to keep learning? Join our wider discussions.

Learn more about how to use this guide.

Found a bug? Report it!

Have a question about your account or billing? Reach out to our customer support team!

None of the above? Find out where to ask other questions here!

Why do we use a decimal in the cause for revenue = 390819.28. Shouldn’t we use double for this since its not a financial application ?

this looks alot like python to me :confused: number wise

It is a financial application. Revenue refers to the total amount of money that the company has brought in. It’s actually $390 819.28

Hello ! I have a code:

using System;

namespace Numbers
class Program
static void Main(string args)
int pizzaShops = 4332 ; // Number of pizza shops

int totalEmployees = 86928 ;  // Number of employees

double revenue = 390819.28 ;  // Revenue

Console.WriteLine("pizzaShops  "+ pizzaShops);

Console.WriteLine( "totalEmployees " +totalEmployees) ;
Console.WriteLine("revenue " +revenue ) ;

I have an answer:

pizzaShops 4332
totalEmployees 86928
revenue 390819.28

Why doesn’t the system skip further?
Did you use Console.WriteLine() to print pizzaShops ?

NEXT button is not active.

It turns out that the system needs this:
Console.WriteLine (pizzaShops);
Console.WriteLine (totalEmployees);
Console.WriteLine (revenue);



how to dot it in single line?? i mean code?

I get the point they’re trying to make with datatypes, but in reality financial operations tend to be int since it is a discreet number of cents.

I am stuck at the very first exercise.

The code:

int pizzaShops;
pizzaShops = 4332;

is not accepted, though perfectly legitimate (at least I think).

I’d love to understand what the error is.

Why is the m after the number of a decimal necessary? The intro said it was to make it clear that we’re defining a decimal, but isn’t that why I’m writing decimal in front of the variable name in the first place? Oo