0
1 - 5 caculator
how do I make a bool value that looks for certain readlines like 2+3= 5 but how do I look for the 2+3 do I use "if"
8 Answers
+ 4
if you are taking a input as string then.
string inp = console.readline();
if(inp.contains("2+3")){
//your code
}
+ 1
use capital c
Contains
+ 1
can you share your piece of code
0
it told me that in contains no definition what did I do wrong
0
oh ok
0
when I type it in it comes out with no input
0
string inp = Console.ReadLine();
if(inp.Contains("1+1")){
Console.WriteLine ("2");
0
I fixed it it was missing 3 }