1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Travka [436]
2 years ago
8

Hello! I am a new coder, so this is a simple question. But I am trying to create a code where you enter a number, then another n

umber, and it divides then multiply the numbers. I put both numbers as a string, and as result when i tried to multiply/divide the numbers that were entered, an error occurred. How can i fix this?
using System;

namespace Percentage_of_a_number
{
class Program
{
static object Main(string[] args)
{
Console.WriteLine("Enter percentage here");
string Percentage = Console.ReadLine();


Console.WriteLine("Enter your number here");
string Number = Console.ReadLine();

String Result = Percentage / 100 * Number;


}
}
}
Computers and Technology
1 answer:
slavikrds [6]2 years ago
6 0

no longer returns an error but your math seems to have something wrong with it, always returns 0

Console.WriteLine("Enter a percentage here");

   int Percent = int.Parse(Console.ReadLine());

   Console.WriteLine("Enter your number here");

   int Number = int.Parse(Console.ReadLine());

   int result = Percent / 100 * Number;

You might be interested in
Whats the next lyric,i baked you a pie,pie,pie
eduard
“oh boy what flavor”
4 0
3 years ago
Read 2 more answers
How computer can affect the life of people?
SCORPION-xisa [38]
<h2>Answer These are the negative effects</h2><h2>Low grades In school: others use the computer not for studying but something else. Which makes them unfocused in school.</h2><h2 /><h2>Waist and wrist pains: Due to long sitting ppl experience pains all over the body. </h2>

<h2>Addiction: People get addicted to the computer and makes them forget they have something important doing.</h2>
4 0
3 years ago
Here is the list of problems to choose from:
olya-2409 [2.1K]

Answer:

There's a parking lot that is 600m² big. The lot must be able to hold at least 3 buses and 10 cars.

Each car takes up 6m² and each bus takes up 30m².

However, there can only be 60 vehicles in the lot at any given time.

The cost to park in the lot is $2.50 per day for cars and $7.50 per day for buses. The lot must make at least $75 each day to break even.

What is a possible car to bus ratio that would allow the lot to make profit?

3 0
2 years ago
Why is it difficult to detect a Trojan horse?
marishachu [46]

Answer:

Explanation:

Because the virus disguises it self as something you are trying to download, then it attackes your device

8 0
3 years ago
Read 2 more answers
Which type of navigation involves multiple frames that are linked to a number of other frames?
sesenic [268]

Answer:

1. b)

2. c)

3. c)

4. a)

5. b)

Explanation:

1. and 5. Linear kind of navigation is a system with a sequential manner web pages that are perfect for some sorts of sites that are having information that has to be viewed as a book (5) and when we are talking about that view we are considering one page after another page like we are reading a book. It is also the simplest navigation. This is the explanation for question 1 and question 5.

2. The most well-designed navigation system is an intuitive one because in this design of the website we have website traffic that is easy because it flows from one web page to another web page. It is showing us where to go to find and look for something and even where to go if there is no concrete options for what are we looking for.

3. A Sitemap is referring to the organized hierarchy of links and it is the protocol that is allowing us to search through many links. A Sitemap is having a listing of the URLs for some site and that is why this is the correct answer.

4. In using liner reciprocal navigation the interface should include how frames are left and how many of them are there. The more the frames, the more times the user will spend on them and the site.

8 0
3 years ago
Other questions:
  • If using the md5 hashing algorithm, what is the length to which each message is padded?
    11·1 answer
  • A.<br> Post-It note<br> b.<br> notebook<br> c.<br> tutor<br> d.<br> spell check
    14·1 answer
  • Hello, can you help me answer these questions?
    9·2 answers
  • W-11/6=4<br><img src="https://tex.z-dn.net/?f=%20%20%5Cfrac%7Bx%20-%2011%20%7D%7B%206%7D%20%20%3D%204" id="TexFormula1" title="
    14·1 answer
  • Which of the following function headings arevalid? If they are invalid, explain why.
    12·1 answer
  • In most programming languages, the compiler carries a preprocessing step to determine if certain statements will compile. For in
    7·1 answer
  • Who is your favorite smite god in Hi-Rez’s “Smite”
    14·1 answer
  • 8.11 LAB: Filter and sort a list
    8·1 answer
  • I think my knee....
    14·1 answer
  • The __________ statement allows you to check for
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!