Menu
Coddy logo textTech

Recap - True or False

Part of the Fundamentals section of Coddy's C# journey — lesson 36 of 69.

challenge icon

Challenge

Beginner

Write a program that gets an input from the user.

The input is read as a string. The program will output "T" if the input equals "1" and "F" otherwise.

To compare strings in C#, you can use .Equals() or ==:
input.Equals("1") returns true if input is "1"
input == "1" does the same thing

Try it yourself

using System;

public class Program {
    public static void Main(string[] args) {
        // Write your code below

    }
}

All lessons in Fundamentals