Visual Studio 2019 how to loop this code in c# 8.0
Q: Main program file: public class BankAccountMainProgram { public static void main(String[]…
A: Step 1:- Class is defined as a collection of data member and member function that is enclosed into a…
Q: APEX Test Class - Salesforce Please Desgin the Apex Test Class to solve the below problem…
A: Apex code :- public class Mul{ public integer a=5;public integer b=9;public integer c;public…
Q: rogramming: C# (Csharp) Help me please kindly apply the C# METHOD on my program Here is my code:…
A: Below is the required C sharp program. Program Approach: There are two types of methods, static…
Q: A destructor function is called automatically when the object goes out of scope: I. the function…
A: A destructor is a member function that destructs or deletes an object. Reason for calling…
Q: in c language all of it in one program Write a program which performs the following actions:…
A: I have given an answer in step 2.
Q: In this c# program please convert into c++ program. Source Code: using System; namespace BMI {…
A: using System;namespace BMI{ internal class Program { static void Main(string[] args)…
Q: Consider the following code snippet [Pseudocode]: Method func) { PRINT "This is not an main…
A: Answer 1. The code will show compile time error. Answer 2. The code will show compile time error.
Q: w it works: • First, it is randomly determined if the user starts the game or the computer and this…
A: Python implementation of Tic Tac Toe game :- import random class TicTacToe: def __init__(self):…
Q: In Java scripts A number is called a Disarium when the sum of its digits in their respective order…
A: Algorithm - create a new method with one argument n. Now create a variable to store the number and…
Q: in C# how would it be changed to use a for loop instead of a while loop to count to 1000?
A: for loop will have initialization, condition check, increment/decrement condition in the body itself…
Q: n and write a C program that performs the following functionality: 1. Read your student number on…
A: CODE #include <stdio.h> // for argv for command line argument int main(int argc, char…
Q: programming: C# (Csharp) Help me please kindly apply the C# METHOD on my program Here is my code:…
A: Below is the required code of swapping using method in C#: using System; namespace Program { //…
Q: Instructions ChiliToGo.java + >- Terminal 1 import java.util.Scanner; 2 class ChiliToGo { sandbox $…
A: Algorithm: Start Read number of adult meals ordered Read number of child meals ordered Calculate…
Q: 1. Find the statement that causes the compilation error. 2. Determine the output if that statement…
A: Here we have a class A with one method. Next, we have another class B that extends A and also has…
Q: class postcovid resultpositive() System.out.println("Result positive"); } void results1() }…
A: Here is your correct code with same functionality and logic and well defined comments, Kindly check…
Q: In this c# program please fix the height and inches, for example "Enter your Height in feet followed…
A: The modified code is given in the below step
Q: I have two codes. One is validator and another is main code. Please make the main code follow…
A: Below code is the implementation of making the main code follow the requirement of validator
Q: Exercise Write a C++ program to develop a Vehicle Fine Management System for Police. The program…
A: Exercise Write a C++ program to develop a Vehicle Fine Management System for Police. The program…
Q: Read your student number on the command line when you call the program executable. Example:…
A: Now, have to read the number using the command line. Step 1.) Argv arrays are used for command-line…
Q: Passed by. means that a copy of an argument s value is passed to a parameter variable. a. conversion…
A: When an argument is transferred by reference, a reference to the actual argument is generated (which…
Q: Main program file: public class BankAccountMainProgram { public static void main(String[]…
A: The given Bank Account Main Program is: public class BankAccountMainProgram{ public static void…
Q: This laboratory work covers the following concepts in C++ programming language: - the string class…
A: Based on C++
Q: 1- Entry Controlled loops: In this type of loops the test condition is tested before entering the…
A: Given few statements The given statements are true or false is discussed below.
Q: Java only Design, implement and test a Java class that processes a series of triangles. For this…
A: Here, we have to provide a java code for the above question.
Q: In this c# program please provide the height (feet and inches) in this program and please show the…
A: In this question, we are asked to modify the code to that user can able to add height and calculate…
Q: Programming Exercise 6-7 D Instructions TriangleWithLoops.java 1 class TriangleWithLoops { public…
A: public class TriangleWithLoops{ public static void main(String[] args) { char ch = 'T'; int…
Q: class postcovid resultpositive() System.out.println("Result positive"); void results1()…
A:
Q: Design and write a C program that performs the following functionality: 1. Read your student number…
A: It is defined as the mother language of all the modern programming languages because most of the…
Q: Static Variable: a variable whose lifetime is the lifetime of the program (static int x;) Dynamic…
A: Given: Static Variable: a variable whose lifetime is the lifetime of the program (static int x;)…
Q: using System; class Program { publicstaticvoid PrintBoard() { Console.WriteLine(" X | | ");…
A: Required: Hello! This program is in C# to play a simple tic tac toe game with the user vs. computer.…
Q: #include using namespace std; class A { private: int x; public: A(int _x) { x = _x; } int…
A: There is one C++ code is given as following, #include <iostream>using namespace std;class A{…
Q: In this c# program please convert into c++ program and please put the height (feet into inches.…
A: Start Accept student name, grade, weight, and height Calculate height in inches Calculate bmi <-…
Q: Computer Science The program below uses a class, DomainAvailabilityTools, which includes a table of…
A: Answer: I have done code and also I have attached code.
Q: C++ Programming Activity: Deque Linked List Explain the flow of the main code not necessarily every…
A: Initially addFirst, addLast, remFirst, remLast are false tempnum, num, sum, count are declared as…
Q: blic class Pickupwindow extends ConsoleProgram ublic void run() // Display menu String menu = "1.…
A: Answer: PickupWindow.java: import java.util.Scanner; public class PickupWindow { public static…
Q: Computer Science Your dev lead wants to plan a celebration for the 100th code war event that we…
A: Implement the code in the language of your choice and give the running time for several values of N…
Q: 1- Entry Controlled loops: In this type of loops the test condition is tested before entering the…
A: Given few statements The solution is given below
Q: //in c# // I am having problem with my regex fitting the requirments using System; using…
A: //in c# // I am having problem with my regex fitting the requirments using System;using…
Q: The files provided in the code editor to the right contain syntax and/or logic errors. In each case,…
A: Fact 1: To access a function of a class we need to use member operator "." The operator is missing…
Q: Code in C Program: PART A: Write the code that defines a struct called cat The following…
A: Defining structure : struct cat{ char name[50]; char color[50]; float weight;};
Q: using System; class Program { public static void Main(string[] args) { int number = 1; while…
A: Hello Student. Warm welcome from my side. Hope you are doing good. I will try my best to answer your…
Q: Create a flowchart base on the source code source code: import java.util.Scanner; public class…
A: The flow chart is a pictorial representation of the flow of the program. The flow chart is…
Q: // This program assigns values to two variables // and performs mathematical operations with them…
A: Explanation: In the given code, values are assigned to "3" variables namely "x", "y", and "z". The…
Q: C# Write a program named TestScoreList that accepts eight int values representing student test…
A: using System;using static System.Console;class TestScoreList{ static void Main() {…
Q: ALL INPUTS AND OUTPUTS OPERATIONS MUST BE DONE USING THE JOPTIONPAN.ALL CODES IN JAVA Write a class…
A: Program description: The java program is to demonstrate the Employee.java class and its driver…
Q: this is my code about the Pig Latin Language. What did I do wrong, please? using static…
A: Introduction of the Program: The C# program takes a word from the user and then convert it into Pig…
Q: | Screen Output #include #include #define MAX 3 typedef struct { char part[20]; int quantity;…
A: #include <stdio.h>#include<stdlib.h>#define MAX 3 typedef struct{ char part[20];…
Q: Design and write a C program that performs the following functionality: 1. Read your student number…
A: CODE #include <stdio.h> // for argv for command line argument int main(int argc, char…
Q: using System; class Program { public static void Main(string[] args) { int number = 1; while…
A: Required: Given program is written for C# to count from 1-1000. How would this program be…
Q: Design and write a C program that performs the following functionality: 1. Read your student number…
A: C code :- #include<stdio.h>#include<string.h>int main() { char…
Visual Studio 2019
how to loop this code in c# 8.0
using System;
namespace ConsoleApp1
{
class Program
{
static void Main(string[] args)
{
double cm, meter, kilometer, mili;//primero se declaran las variables
Console.WriteLine("Introduzca los kilómetros");
kilometer = Convert.ToInt32(Console.ReadLine());
Console.WriteLine("Introduzca los metros");
meter = Convert.ToInt32(Console.ReadLine());
Console.WriteLine("Introduzca los centimetros");
cm = Convert.ToInt32(Console.ReadLine());
Console.WriteLine("Introduzca los milímetros");
mili = Convert.ToInt32(Console.ReadLine());
Console.WriteLine("Seleccione una opción");
Console.WriteLine("\ta-Conversion de kilometros a: ");
Console.WriteLine("\tb-Conversion de metros a: ");
Console.WriteLine("\tc-Conversion de centimetros a: ");
Console.WriteLine("\td-Conversion de milimetros a: ");
Console.Write("¿Tú opción? ");
switch (Console.ReadLine())
{
case "a":
Console.WriteLine("kilómetro a metro:" + (meter = kilometer * 1000.0));
Console.WriteLine("kilómetro a centimetro:" + (cm = kilometer * 100000.0));
Console.WriteLine("kilómetro a milimetro:" + (mili = kilometer * 1000000.0));
break;
case "b":
Console.WriteLine("metro a kilometro:" + (kilometer = meter / 1000.0));
Console.WriteLine("metro a centimetro:" + (cm = meter * 100.0));
Console.WriteLine("metro a milimetro:" + (mili = meter * 1000.0));
break;
case "c":
Console.WriteLine("centimetro a kilometro:" + (kilometer = cm / 100000.0));
Console.WriteLine("centimetro a metro:" + (meter = cm / 100.0));
Console.WriteLine("centimetro a milimetro:" + (mili = cm * 10.0));
break;
case "d":
Console.WriteLine("milimetro a kilometro:" + (kilometer = mili / 1000000.0));
Console.WriteLine("milimetro a metro:" + (meter = mili / 1000.0));
Console.WriteLine("milimetro a centimetro:" + (cm = mili / 10.0));
break;
}
}
}
}
Step by step
Solved in 2 steps
- Java Program ************This program must work in hypergrade and pass all the test cases.********** Please modify this program down below because it does not pass all the test cases. I have provided the failed test cases and the correct test case as a screenshot. import java.io.BufferedReader;import java.io.FileReader;import java.io.IOException;import java.io.InputStreamReader; // Import InputStreamReaderpublic class WordSeparator { public static void main(String[] args) { try (BufferedReader reader = new BufferedReader(new InputStreamReader(System.in))) { String inputFileName; while (true) { System.out.print("Please enter the file name or type QUIT to exit:\n"); inputFileName = reader.readLine(); if (inputFileName.equalsIgnoreCase("QUIT")) { break; } try { BufferedReader fileReader = new BufferedReader(new…programming: C# (Csharp) Help me please kindly apply the C# METHOD on my program Here is my code: using System;namespace Program{ class Program { static void Main(string[] args) { int a, b ; Console.Write("\nEnter Number a : "); a = int.Parse(Console.ReadLine()); Console.Write("\nEnter Number b : "); b = int.Parse(Console.ReadLine()); Console.Write("\nNumber Before Swapping a : "+a+" b : "+b); a = a*b; b = a/b; a = a/b; Console.Write("\nNumber After Swapping a : "+a+" b : "+b); } }}Following programs contain syntax/logical errors. Underline the error and explain precisely the cause of the error to get any credit. Just underlining will not be given credit. [2.5x2=5] i. interface P{ void fun(int x) ; } ------------------------ class S implements P{ public void funny(){ System.out.print(“OOP is funny”); } public static void main(String args[]){ S s1 = new S(); s1.funny() } } ii. public class A{ int x; void A(int x) { this.x=x; System.out.println("in Class A"); } public static void main(String[] args){ new A(5); }
- You are said to store data of Hospitals in a city. For that purpose, you are asked to develop a structure of maxHeap using these structures in c++. You have to submit Hospital. h file only class Hospital { string HospitalName;string Address;string HospitalID;public:Hospital(); Hospital(string ,string ,string); Hospital(string HospitalID); // conversion Constructor string getHospitalName()const; string getHospitalId()const; string getAddress()const; void setHospitalName(string); void setHospitalId(string);void setAddress(string); // Relational operators with respect to Hospital Idbool operator<(Hospital)const;bool operator<=(Hospital)const;bool operator>(Hospital)const; bool operator>=(Hospital)const; bool operator==(Hospital)const;bool operator!=(Hospital)const; // output stream operatorfriend ostream& operator<<(ostream&, const Hospital& ref); s}; ostream& operator<<(ostream&, const Hospital& ref); class MaxHeap { public:class Node…programming: C# (Csharp) Help me please kindly apply the C# METHOD on my program Here is my code: using System; //HEADERclass program { static void Main() { int n; Console.WriteLine("Enter 5-digit number: "); // PROMPT USER n = Convert.ToInt32(Console.ReadLine()); // SCAN Console.Write(n / 10000 % 10 + "*"); Console.Write(n / 1000 % 10 + "*"); //ASTERISK PROCESS PART Console.Write(n / 100 % 10 + "*"); Console.Write(n / 10 % 10 + "*"); Console.Write(n % 10 ); // RESULT }}C programming: Stacks. Help fully understand the code below by putting comments. THanks! ... #include<stdio.h> #include<stdlib.h> #include<ctype.h> #include<string.h> int numbers[500], tn=-1, to=-1; char ops[500]; void pushNum(int n) { numbers[++tn] = n; } void pushOp(char ch) { ops[++to]=ch; } int popNum() { return numbers[tn--]; } char popOp() { return ops[to--]; } int precedence(char op){ if(op == '+'||op == '-') return 1; if(op == '*'||op == '/') return 2; return 0; } // this function will perform arithmetic operations. int applyOp(int a, int b, char op){ switch(op){ case '+': return a + b; case '-': return a - b; case '*': return a * b; case '/': return a / b; default: return 0; } } int isOperator(char ch) { return(ch=='+'||ch=='-'||ch=='*'||ch=='/'||ch=='^'); } int evaluate(char exp[200]){ int i,num,output,r; char c; for(i=0;exp[i]!='\0';i++) { c = exp[i];…
- using System; class TicTacToe { staticint player = 1; staticint choice; staticvoid Print( char[] board); staticvoid Main(string[] args) { Console.WriteLine(); Console.WriteLine($" {board[0]} | {board[1]} | {board[2]} "); Console.WriteLine($" {board[3]} | {board[4]} | {board[5]} "); Console.WriteLine($" {board[6]} | {board[7]} | {board[8]} "); Console.WriteLine(); } staticvoid Main(string[] args) { char[] board = newchar[9]; for (int i = 0; i < 9; i = i + 1) { board[i] = ' '; if( board[i]== 'O') Console.Write("It is your turn to place an X"); } Print(board); board[4] = 'X'; Print(board); board[0] = 'O'; Print(board); board[3] = 'X'; Print(board); board[5] = 'O'; Print(board); board[6] = 'X'; Print(board); board[2] = 'O'; Print(board); } } Hello! I need help with getting my code to compile. It's written in C# and i'm a beginner. it's giving me two errors and i'm not sure how to fix them. Please don't copy paste an answer from google.please fix what is wrong with the below C# code: using System; namespace Animals{ class Animals { public static bool CheckGuess(string animalType, string typeGuess) { static bool Main(string[] args, string animalType, string typeGuess) { if (String.Equals(animalType, typeGuess)){ return true; } return false; } string animalType = "Dog"; string typeGuess; int count = 0; bool result; Console.Write("Guess the animal: "); typeGuess = Console.ReadLine(); while(true){ count++; result = CheckGuess(animalType, typeGuess); if(result){ Console.WriteLine("You have Guess it Correct in " + count + " times.\n"); break; } else{ Console.WriteLine("You have Guess it Wrong " + count + " times!!\n"); Console.Write("Guess the animal again: "); typeGuess = Console.ReadLine();…THIS NEEDS TO BE DONE IN C#! NOT JAVA! NOT C++, NOT PYTHON! PLEASE WRITE THIS IN C#! Take the following class: class Pokemon { string Name; string Type; int Health; } Override the ToString method so that it it outputs the Pokemon's heath. Example: Let's say we have a Pikachu named Sparky and it had 200 health. When we called ToString, we would get the following string: Rex: Pikachu (200)
- Ocelot/PuTTY(C Language) Through this programming assignment, the students will learn to do the following: Learn to work with command line options and arguments Gain more experience with Makefiles Gain more experience with Unix Learn to use some of the available math funtions available with C Usage: mortgagepmt [-s] -r rate [-d downpayment] price In this assignment, you are asked to do a mortgage payment calculation. All information needed for this will be passed to the program on the command line. There will be no user input during the execution of the program. You will need a few pieces of information. The price of the home and the amount of the down payment. You will also need to know the interest rate and the term of the mortgage. To figure your mortgage payment, start by converting your annual interest rate to a monthly interest rate by dividing by 12. Next, add 1 to the monthly rate. Third, multiply the number of years in the term of the mortgage by 12 to calculate the number…Java Program ASAP ************This program must work in hypergrade and pass all the test cases.********** This program down below does not pass the test cases in Hypergrade as shown in the scheenshot. Please modify it. Also I have provided the code instructions. Thank you import java.io.BufferedReader;import java.io.FileReader;import java.io.IOException;import java.io.InputStreamReader;import java.util.regex.Pattern;import java.util.regex.Matcher;public class WordSeparator { public static void main(String[] args) { try (BufferedReader reader = new BufferedReader(new InputStreamReader(System.in))) { String inputFileName; boolean fileNotFound; System.out.print("Please enter the file name or type QUIT to exit:\n"); do { fileNotFound = false; // Reset fileNotFound flag for each iteration inputFileName = reader.readLine(); if (inputFileName.equalsIgnoreCase("QUIT")) {…In this c# program please convert into c++ program. Source Code: using System;namespace BMI{ internal class Program { static void Main(string[] args) { float bmi, m, h, b ; String name; Console.Write("Enter the student name: "); name = Console.ReadLine(); Console.Write("\nEnter the grade level(1-6): "); h = float.Parse(Console.ReadLine()); Console.Write("\nEnter the student Weight(kg): "); m = float.Parse(Console.ReadLine()); Console.Write("\nEnter the height (feet and inches): "); b = float.Parse(Console.ReadLine()); bmi = m / (h * h); Console.WriteLine("\nStudent BMI is: " + bmi); if(bmi < 18.5) { Console.WriteLine("\nStudent is Underweight"); } else if(bmi >= 18.5 && bmi < 25) { Console.WriteLine("\nStudent is…