CJCoding With Joseph
15free / daySign inCreate account
TitleOpen
29
Declare an IntDeclare an int variable named count with the value 10, then print it (see Expected Output).
easyNot startedSolve
30
Declare a DoubleDeclare a double variable named pi with the value 3.14, then print it (see Expected Output).
easyNot startedSolve
31
Declare a StringDeclare a string variable named word with the value "hello", then print it (see Expected Output).
easyNot startedSolve
32
Declare a BoolDeclare a bool variable named isReady with the value true, then print it (C# prints it capitalized) (see Expected Output).
easyNot startedSolve
33
Sum of Two Int VariablesTwo int variables a and b are given.
easyNot startedSolve
34
Difference of Two VariablesTwo int variables are given.
easyNot startedSolve
35
Product of Two VariablesTwo int variables are given.
easyNot startedSolve
36
Use var for Type InferenceThe var keyword lets C# infer the type from the value.
easyNot startedSolve
37
Declare a ConstantA const value cannot be changed after it is set.
easyNot startedSolve
38
Integer DivisionWhen both operands are ints, / does integer division (it drops the fractional part).
easyNot startedSolve
39
Remainder with ModuloThe % operator gives the remainder of a division.
easyNot startedSolve
40
Double DivisionIf at least one operand is a double, / keeps the decimal part.
easyNot startedSolve
41
Reassign a VariableDeclare an int with value 5, then reassign it to 10, then print it (see Expected Output).
easyNot startedSolve
42
Increment a VariableThe ++ operator adds 1 to a variable.
easyNot startedSolve
43
Compound AssignmentThe += operator adds a value to a variable.
easyNot startedSolve
44
Average of Two NumbersTwo int variables are given.
easyNot startedSolve
237
Your First IntegerEvery program keeps track of data using variables.
easyNot startedSolve
238
Greeting with a StringString variables hold text.
easyNot startedSolve
239
A Price with DecimalsThe double type stores numbers that can have a decimal point.
easyNot startedSolve
240
True or FalseA bool variable holds one of two values: true or false.
easyNot startedSolve
241
A Single CharacterThe char type stores exactly one character, written between single quotes.
easyNot startedSolve
242
Adding Two NumbersVariables can be combined in calculations.
easyNot startedSolve
243
Changing a ValueAfter you declare a variable you can change its value by assigning a new one, as long as the type stays the same.
easyNot startedSolve
342
Declare a CharDeclare a char variable named letter with the value 'A', then print it (see Expected Output).
easyNot startedSolve
343
Declare a LongDeclare a long variable named population with the value 8000000000 (too large for an int), then print it (see Expected Output).
easyNot startedSolve
344
Declare a FloatDeclare a float variable named pi with the value 3.14f, then print it (see Expected Output).
easyNot startedSolve
345
Declare a DecimalDeclare a decimal variable named price with the value 19.99m, then print it (see Expected Output).
easyNot startedSolve
346
Declare a ByteDeclare a byte variable named level with the value 255 (the largest value a byte can hold), then print it (see Expected Output).
easyNot startedSolve
347
Negate a BooleanA bool isOpen is set to true.
easyNot startedSolve
348
ASCII Code to CharacterThe integer code = 66 is an ASCII value.
easyNot startedSolve
349
Convert an Int to a StringDeclare int year = 2026.
easyNot startedSolve
350
Decrement a VariableDeclare int lives = 3, then use the -- operator to decrease it by one and print the result (see Expected Output).
easyNot startedSolve
351
Square a VariableDeclare int n = 6.
easyNot startedSolve
352
Negate a NumberDeclare int n = 5.
easyNot startedSolve
353
Area of a RectangleDeclare int width = 5 and int height = 3.
easyNot startedSolve
45
Cast a Double to an IntCasting a double to an int with (int) drops the decimal part (it truncates, not rounds).
mediumNot startedSolve
46
Parse a String to an Intint.Parse converts a string of digits into an int.
mediumNot startedSolve
47
Divide Ints as DoublesTo get a decimal result from two ints, cast one to double first.
mediumNot startedSolve
48
Store a Boolean ExpressionA comparison can be stored in a bool variable.
mediumNot startedSolve
49
Swap Two VariablesSwap the values of two int variables using a temporary variable, then print them on one line separated by a space.
mediumNot startedSolve
50
Parse a String to a Doubledouble.Parse converts a decimal string to a double.
mediumNot startedSolve
51
Character to ASCII CodeCasting a char to an int gives its character code.
mediumNot startedSolve
52
Declare Several VariablesYou can declare several variables of the same type in one statement.
mediumNot startedSolve
53
Celsius to FahrenheitConvert a Celsius temperature to Fahrenheit using F = C 9 / 5 + 32.
mediumNot startedSolve
244
A Small ProfileReal programs often combine several different variable types in one message.
mediumNot startedSolve
245
Comparing for EqualityA boolean variable can store the result of a comparison.
mediumNot startedSolve
246
Building a Word from CharactersConsole.Write prints without moving to a new line, while Console.WriteLine adds a line break at the end.
mediumNot startedSolve
354
Fahrenheit to CelsiusDeclare double fahrenheit = 212.
mediumNot startedSolve
355
Last Digit of a NumberDeclare int number = 3742.
mediumNot startedSolve
356
Assign the Max with a TernaryDeclare int a = 7 and int b = 3.
mediumNot startedSolve
357
Compute a PercentageDeclare int score = 45 and int total = 60.
mediumNot startedSolve
358
Combine Conditions with ANDDeclare int age = 25 and bool hasTicket = true.
mediumNot startedSolve
359
Combine Conditions with ORDeclare bool isWeekend = false and bool isHoliday = true.
mediumNot startedSolve
360
Digit Character to NumberDeclare char digit = '7'.
mediumNot startedSolve
361
Minutes to Hours and MinutesDeclare int totalMinutes = 135.
mediumNot startedSolve
362
Apply a DiscountDeclare int price = 80 and int discountPercent = 25.
mediumNot startedSolve
363
Seconds to H:M:SDeclare int totalSeconds = 5025.
hardNot startedSolve
364
Reverse a Three-Digit NumberDeclare int n = 123.
hardNot startedSolve
365hardNot startedSolve
366
Split Cents into Dollars and CentsDeclare int totalCents = 1234.
hardNot startedSolve