Recap - True or False
Part of the Fundamentals section of Coddy's C# journey — lesson 36 of 69.
Challenge
BeginnerWrite 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
4Operators Part 1
Arithmetic OperatorsModulo OperatorIncrement/DecrementPost Increment/DecrementArithmetic Shortcuts5Operators Part 2
Comparison OperatorsLogical Operators Part 1Logical Operators Part 2Recap - Simple LogicLogical Operators Part 3