[Solved] C# “if” and “for” [closed]

Introduction The “if” and “for” statements are two of the most commonly used control flow statements in C# programming. The “if” statement is used to execute a certain block of code if a certain condition is met, while the “for” statement is used to execute a certain block of code a certain number of times. … Read more

[Solved] how to split a text in to paragraph with a particular string

Try using RegEx.Split() using this pattern: (.*This is common text.*) Well, giving priority to RegEx over the string functions is always leads to a performance overhead. It would be great if you use: (UnTested but it will give you an idea) string[] lines = IO.File.ReadAllLines(“FilePath”) List<string> lst = new List<string>(); List<string> lstgroup = new List<string>(); … Read more

[Solved] if conditions, when i want to second argument [closed]

Not sure if you are aware, but when you run (sorry for running on windows) program.exe arg1 arg2 then argv[0] is program.exe, argv[1] is arg1, argv[2] is arg2, so careful what you call the 1st and 2nd argument, meaning argv[1] is indeed the first string after the binary name, but only because of C++ indexing … Read more

[Solved] if conditions, when i want to second argument [closed]

Introduction The if condition is a powerful tool in programming that allows you to execute a certain set of instructions based on a certain condition. It is a type of conditional statement that allows you to check if a certain condition is true or false and then execute a certain set of instructions based on … Read more

[Solved] Check C Programming Code [closed]

There are many prblems in your code. To name a few: scanf(“%c”,&choice1); will consider the enter key press. case 5 float price(); –> not correct. if(decision1 == ‘y’){ main(); }–> use a flag and do..while() etc. etc. Also, it is not a very good practive to put everything inside main. To clean up the code … Read more

[Solved] hash it!! wrong answer, can’t figure out [closed]

You’ve been tasked with implementing a hashtable — this involves defining data types and functions to manipulate those types. I have no idea what you’re doing. First define a hashtable — do this by defining two types; one table type and one slot type. typedef struct table table; typedef struct slot slot; The table is … Read more