![]() Step 4) Print values of some variables in following formats: 1) Currency ii) Number i) Hexadecimal Iv) Percentage. Step 3) Print the values of the variables using format strings and placeholders in Console.Write() Console.WriteLine). Step 2) Assign valid literals to those variables. In A1Q2.cs do the following tasks: Step 1) Declare variables of different data types ( at least 10 variables ). ![]() Project name should include students' firstname(s) followed by Al(Example: HarleenHardeep_AI) In this project. Make sure that you paste the output screen below the C# code.ĪSSIGNMENT (C#) Question - 2) Create a C# Console application( DOT net framework) using Visual Studio IDE. Also copy and paste the C# code in your Word document. Take the screen shots of the command prompt and paste in MS Word document. Compile your C sharp program and Execute it. Make sure to embed comments to explain what each data type mean and in what context you should use such variables, (Subm ation: Create a MS word nd paste the C# Sem in MS word You cea a usmg notep-7) After completing the C# program, open up Command Prompt(cmd) window. Print the variables' values using format strings. For example: Try to declare some variables of different data types, demonstrate how you assign valid literals to them. You may use any statement you have learnt so far in C#. Transcribed image text: 1) Write a C# program using Notepad (do not use Visual Studio IDE).
0 Comments
Leave a Reply. |