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
son4ous [18]
3 years ago
8

Write a program in c++ to read two integers, calculate and print the smallest

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

Answer:

#include<iostream>

using namespace std;

int main (){

int n1, n2;

cout<<"Enter 1st number";

cin>>n1;

cout<<"Enter 2nd number";

cin>>n2;

if(n1<n2){

cout<<"The 1st number is the smallest"<<endl<<" is= "<<n1;

}

else{

cout<<"The 2nd number is the smallest"<<endl<<" is= "<<n2;

}

}

return 0;

You might be interested in
1. According to the Department of Commerce, _________ percent of single moms in the US qualified as poor.​
Allisa [31]

Answer:

. According to the Department of Commerce, 34.0% percent of single moms in the US qualified as poor.​

Explanation:

8 0
3 years ago
*/ What's wrong with this program? /* public MyProgram { public static void main(String[] args); } int a, b, c \\ Three integers
gulaghasi [49]

Answer:

A lot is wrong with the program given in the question. See the corrected version below:

<em>public class ANot {</em>

<em>    public static void main(String[] args) {</em>

<em>        int a, b, c;</em>

<em>    //Three integers</em>

<em>    a = 3; b = 4; c = a + b;</em>

<em>        System.out.println("The value of c is " + c);</em>

<em>    }</em>

<em>}</em>

Explanation:

Errors:

1. The main method had a semi colon after it. This is wrong

2. An open brace was supposed to follow the main method

3. The declaration of the variables was supposed to end with a semi colon

4. the correct comment style is // and not \\

5. Initialization of variables was supposed to end with semi colons

6. The output statement had C and not c which is the declared and initialized variable..Java is strictly typed

7. Open and closing braces for the class and method wrongly placed

6 0
3 years ago
Fill in the blank: In a Word chart, text that describes the data represented in a chart and that is typically displayed on the r
Triss [41]

Answer:

Data bar

Explanation:

8 0
3 years ago
Лемма деген не<br> конспект
xxMikexx [17]

huh? ano daw? kfjfdkvdddddddddddddddd

4 0
3 years ago
Graphics you can select to reinforce the goal of your document include ____.
Tanya [424]
The answer would be D all of the above.
8 0
2 years ago
Other questions:
  • The buttons on a specific tab are organized into logical Ribbons. <br> T<br> F
    12·2 answers
  • Consider the scenario below and determine the most likely source of the problem. A user reports that her or his printer is not r
    13·2 answers
  • 1. What is the main factor that affects Earth’s average temperature?
    12·1 answer
  • A real-world problem that might be explained or predicted through the creation of a computer simulation
    7·1 answer
  • Ethics is a way of behaving so that you are
    7·2 answers
  • The space between letters in a word is an example of what kind of space?
    15·2 answers
  • When you write contracts, should you list many definitions at the start of the document?
    6·1 answer
  • Which key doesn't relate to keyboard A:return key B :enrollment key C: delete key D:tab key
    9·2 answers
  • Firestick optimizing system storage and applications
    14·1 answer
  • A continuous and differentiable function f(x) with the following properties: f(x) is decreasing at x=−5 f(x) has a local minimum
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!