Answer:
#include <iostream>
using namespace std;
int main()
{
float celsius;
cout<<"Enter the temperature in Celsius: ";
cin>>celsius;
float Fahrenheit = 1.8 * celsius + 32;
cout<<"The temperature in Fahrenheit is: "<<Fahrenheit<<endl;
}
Explanation:
first include the library iostream in the c++ programming.
Then, create the main function and declare the variable celsius.
cout is used to print the message on the screen.
cin is used to store the user enter value in the variable.
then, apply the formula for calculating the temperature in Fahrenheit
and store the result in the variable.
Finally, print the result.
that is Equally as long as your car
Answer:
import java.util.Scanner;
public class num1 {
public static void main(String[] args) {
Scanner in = new Scanner(System.in);
System.out.println("Enter User name 1 and 2");
int userNum1 = in.nextInt();
int userNum2= in.nextInt();
if(userNum1<0){
System.out.println("userNum1 is negative.");
}
else if(userNum2>8){
userNum2 =0;
}
else{
System.out.println("userNum2 is less than or equal to 8..");
}
}
}
Explanation:
This is implemented in Java programming language
Using the scanner class, the user is prompted to enter two numbers
These are saved in the variable userNum1 and userNum2 respectively.
If, else if and else statements are then used according to the specifications given in the question.
False, the intranet <span> does not refer to a network that supports communication between different organizations.</span>
Answer:
-32 to +31
Explanation:
6 bit 2s complement representation will be of the form b1b2b3b4b5b6 where each bit is either 0 or 1.
The largest positive number that can be represented using this scheme is 011111
Translating this to decimal this is 1*2^4 + 1^2^3 + 1^2^2 + 1^2^1 + 1^2^0
=16 + 8 + 4 + 2 + 1 =31
The smallest negative number that can be represented using this scheme is 100000
Translating this to decimal = -1 * 2^5 = -32
So the range of decimal values that can be represented is -32 to +31.