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
Alexxandr [17]
3 years ago
7

What is wrong with my code?

Computers and Technology
1 answer:
sineoko [7]3 years ago
3 0

Answer:

namespace FavoriteNumber

{

   class Program

   {

       static void Main(string[] args)

       {

           Console.Write("Enter your favorite number!: ");

           string faveNumber = Console.ReadLine();

           int number = Convert.ToInt32(faveNumber);

           Console.Write($"Your favorite number seems to be {number}");

       }

   }

}

Explanation:

You were close. Spot the differences. A statement should end with a semicolon. Console.ReadLine() returns a string. That string is the input of what you want to convert to an int.

And of course you need to match each opening brace { with a closing brace }.

You might be interested in
1 what elements of composition are under your control in photoshop
inn [45]
Tone
Sharpness
Scale
Arrangement
7 0
3 years ago
write a C++ program that ask the user for the number of cookies eaten and display the calorie consumption
Artyom0805 [142]

Answer:

#include <iostream>

using namespace std;

int main()

{

   int cookies;

   cin >> cookies;

   cout << "The calorie consumption is: " << cookies * 142 << endl;

   return 0;

}

Explanation:

First line: include basic library of C++(input and output).

using namespace std;

Says to compiler we are using std.

int main() Main function

int cookies, cookies variable, of int type

cin >> cookies

get the number of the cookies from user

cout Print the text and calories(one cookie have 142 calories)

Have a nice day ;)

4 0
2 years ago
Win10如何删除自己添加的环境变量?...............
Paha777 [63]

Answer:

方法/步骤

右键单击以选择此计算机,然后有一个菜单来选择属性。

选择后,打开属性面板以找到我们的高级系统设置。

打开后,我们在系统设置下找到高级设置。

打开后,我们看到下面有一个环境变量选项。

打开后,我们在右下角看到一个删除选项。

单击删除到,在右下角后单击删除,然后单击确定的选项。 ...

本文未经授权摘自百度经验

8 0
2 years ago
For your biology class, you have taken a number of measurements for A plant growth experiment. you wish to create a chart that s
Natasha2012 [34]
The answer is B, calc or excel
4 0
3 years ago
What is basically the only thing that computers (microprocessors and prgrammable devices) understand?
horsena [70]

Answer:

Binary Code

Explanation:

All microprocessors and programmable devices understand is Binary Code. These are various combinations of 0's and 1's which when placed together in a sequence represent a set of instructions that the microprocessor can read and understand to complete complex tasks. There are various other programming languages to program these tasks in an easier to read syntax for the programmers themselves but they simply take the written code and convert it into Binary before sending it to the microprocessor.

4 0
2 years ago
Other questions:
  • A. True
    6·1 answer
  • Lesson 15: Integrated Literacy Connections Education Introduction to Computer Applications Unit 6: Internet Safety
    5·1 answer
  • Where can you find gradpoint answers
    13·2 answers
  • Which of the following is a requirement for the Safety Data Sheet (SDS)?​
    5·1 answer
  • Carol typed a memo to send to everyone in her department. To create this memo, she used a _____.
    8·2 answers
  • Which of the following might an interior designer in the retail industry specialize in?
    9·1 answer
  • Data ____ refers to the accuracy of the data in a database
    9·1 answer
  • What are some common uses of Excel?
    10·1 answer
  • Owen is writing a program that will lock his computer for one hour if the incorrect password is entered more than five times. Ha
    14·1 answer
  • What are common considerations businesses need to make before purchasing new computers? Check all of the boxes that apply.
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!