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
TEA [102]
2 years ago
7

Write a complete program that declares an integer variable

Computers and Technology
1 answer:
Fed [463]2 years ago
3 0

Answer:

Java:

import java.util.Scanner;

public class Main {

 public static void main(String[] args) {

   Scanner sc = new Scanner(System.in);

   int number = sc.nextInt();

   System.out.println(number + " " + number*2 + " " + number**2);

 }

}

Python:

num = int(input("Number: "))

print(num+" "+num*2+" "+num**2)

C++:

#include <iostream>

int main() {

 int number;

 std::cin >> number;

 std::cout << num << " " << num*2 << " " << num**2;

 return 0;

}

You might be interested in
What is considered any computer system that isn't a general-purpose pc or server?
Kay [80]

Embedded system is considered any computer system that isn't a general-purpose pc or server.

<h3>What is an embedded system?</h3>

An embedded system is a combination of computer hardware and software designed for a specific function. Embedded systems may also function within a larger system. The systems can be programmable or have a fixed functionality.

<h3>What is embedded system and its types?</h3>

Embedded systems comprise hardware and software that work together to perform specific tasks. They rely on microprocessors, microcontrollers, memory, input/output communication interfaces, and a power supply to function

To learn more about embedded system, refer

brainly.com/question/13014225

#SPJ4

3 0
2 years ago
I want to discard my old computer and securely erase the data from my hard drive.
FrozenT [24]
Wipe off the hard drive with a software eraser but it won't be quick and won't work on defective disks
3 0
3 years ago
In mathematics, "quadrant I" of the cartesian plane is the part of the plane where x and y are both positive. Given a variable,
lbvjy [14]

Answer:

#include <iostream>

using namespace std;

struct Cartesian {

double x;

double y;

};

int main() {

// creating a pointer p of type struct Cartesian

struct Cartesian *p = new Cartesian ;

cout << " Enter x: ";

// accessing the structure variable x by arrow "->"

cin >> p->x;

cout << "Enter y: ";

// accessing the structure variable y by arrow "->"

cin >> p->y;

// expression to check whether x and y lie in Quadrant 1

if (p->x > 0 && p->y > 0) {

 cout << "X and Y are in Quadrant 1 ";

}

else

{

 cout << "x And y are not in Quadrant 1";

}

// deleting the struct pointer p

delete p;

return 0;

}

Explanation:

in order to locate memory in heap, keyword "new" is used in C++ so,

struct Cartesian *p = new Cartesian ;

in order to access data members of the structure using pointer we always use an arrow "->". otherwise a dot oprerator is used to access data members.

in order to check whether x and y lie in 1st quadrent, we must use && operator in our if condition. so

if (p->x > 0 && p->y > 0)

&& will return true iff x and y both are +ve.

deleting the struct pointer p is important beacuse we are allocating memory in heap so heap memory should be used a resource and must be release when not needed otherwise it can cause memory leakage problems. so  

delete p;

5 0
3 years ago
Which term describes the distinct number of colors a graphic contains? (1 point)?
laila [671]
Your answer would be "Hue".
4 0
3 years ago
7. One hazard associated with driving downhill is:
melamori03 [73]

Answer:

is this a multipe choice question? or should i answer what i would think is dangerous about driving down hill?

Explanation:

please elaborate so i can answer better! :D

4 0
3 years ago
Other questions:
  • An application needs to calculate sales tax for purchases. You decide to simplify the code by putting the sales tax calculation
    9·1 answer
  • When a compiler finds errors, it usually indicates what they are so you can correct the code and compile the program again?
    11·1 answer
  • Which of the following can a cell contain?
    9·2 answers
  • What types of tools are used in the process of a digital or network investigation?
    12·1 answer
  • One lap around a standard high-school running track is exactly 0.25 miles. Write a program that takes a number of miles as input
    12·1 answer
  • I love my baby boy and can someone help me with this
    6·1 answer
  • Ano ang humahati ng globo ng equdor
    8·1 answer
  • Consider the following code segments that are potential replacements for /* missing code */.
    6·1 answer
  • Please please help I don’t understand this
    6·1 answer
  • Select all the correct answers.
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!