In Visual Studio, create and test a console application that does the following: (1) Create a variable of the Integer data type, named marks; (2) Create a variable of the String data type, named grade: (3) Use the built-in function Console.ReadLine() to get the user's input for marks as follows (it is assumed that the user always inputs integers when testing this program): the marks:") Console.WriteLine("Input marks - CType(Console.ReadLine(), Integer) (4) Convert marks into grade as follows using an If-Then-Elself statement: marks 90-100 85.89 80-84 77-79 73-76 70-72 ********** 67-69 63-66 60-62 50-59 0-49 grade A+ A A B+ B C+ D F (5) Display the value of grade in the console window using the following statement: Console.WriteLine("The grade is" & grade) Hint: The If-Then-Ebelf statement is a lengthy one and is similar to the following: If ((marks >90) And (marks <100)) Then grade "+" ElseIf ((marks >85) And (marks <-89)) Then grade "A" ********** ElseIf ((marks >0) And (marks-49) Then grade "F
Addition of Two Numbers
Adding two numbers in programming is essentially the same as adding two numbers in general arithmetic. A significant difference is that in programming, you need to pay attention to the data type of the variable that will hold the sum of two numbers.
C++
C++ is a general-purpose hybrid language, which supports both OOPs and procedural language designed and developed by Bjarne Stroustrup. It began in 1979 as “C with Classes” at Bell Labs and first appeared in the year 1985 as C++. It is the superset of C programming language, because it uses most of the C code syntax. Due to its hybrid functionality, it used to develop embedded systems, operating systems, web browser, GUI and video games.


Step by step
Solved in 3 steps with 3 images









