answersLogoWhite

0

Input and output should be trivial; the core of it is: m = (n<<3)>>5

Note: it is not the same as m = n>>2

User Avatar

Wiki User

15y ago

What else can I help you with?

Continue Learning about Engineering

Write a program in java to enter 3 digits or more arrange the digits of the entered number in ascending order and display the result?

public static void main(String[] args) { int val = 100; int val1 = 50; System.out.println("Number of digits in " + val + " is: " + new String(val + "").length()); System.out.println("Number of digits in " + val1 + " is: " + new String(val1 + "").length()); }


What is the flow chart for a program that finds two product numbers?

Since all decent programming languages have the multiplication operator, you simply multiply them. If you want to go into a bit more detail, it would be a bit like this: Ask user for number "a" Ask user for number "b" Calculate result = a * b Show result (End) Use the appropriate flow chart symbols for input, etc.


A c program for multiplication of two integers a and b?

/*PROGRAM TO ACCEPT TWO NUMBERS FROM THE USER AND PRINT THEIR MULTIPLICATION. */ #include&lt;stdio.h&gt; #include&lt;conio.h&gt; void main() { int a, b, c; // Declaration of Variables. Variables 'a' &amp; 'b' to hold first &amp; second number. And 'c' to hold result. clrscr(); // To clear the output screen every time program is executed. printf("\n Enter the first number : "); scanf("%d", &amp;a); // To accept the first number. printf("\n Enter the second number : "); scanf("%d", &amp;b); // To accept the second number. c = a*b; // Logic to get the product of the entered two numbers. printf("\n Multiplication of %d &amp; %d = %d", a, b, c); // Displaying result. getch(); // To hold the output screen. }


How Write javascript program to display multiplication table of 2 without accepting input from user?

Use a counted for loop. On each iteration, multiply the control variable by 2 and print the result.


Explain what you understand by a program with one example?

A program is a set of instructions written in a programming language that tells a computer how to perform specific tasks. For example, a simple calculator program can take user input for two numbers and an operation (like addition or subtraction), process that input, and then display the result. This program demonstrates how code can automate calculations and provide user-friendly interaction.

Related Questions

If you enter a number into a calculator and then press the log x key the calculator will display the?

If you enter a number into a calculator and then press the log x key, the calculator will display the logarithm of that number. Typically, this refers to the base 10 logarithm (common logarithm) unless specified otherwise. The result indicates the power to which the base (10) must be raised to obtain the entered number. For example, if you enter 100, the display will show 2, since (10^2 = 100).


Write a program in java to enter 3 digits or more arrange the digits of the entered number in ascending order and display the result?

public static void main(String[] args) { int val = 100; int val1 = 50; System.out.println("Number of digits in " + val + " is: " + new String(val + "").length()); System.out.println("Number of digits in " + val1 + " is: " + new String(val1 + "").length()); }


Why does a certain number in excell change to a formula?

In Excel, a number may change to a formula if it is preceded by an equals sign (=), which indicates that the cell should calculate a value based on the expression that follows. For example, if you enter =5+3, Excel interprets this as a formula and will display the result (8) instead of the original text. Additionally, if a cell is formatted as a formula or contains a formula that references other cells, it will also display the calculated result rather than a static number. To prevent this, ensure that the number is entered without an equals sign and in the correct format.


What was a result of the stock market crash farmers problems and the overuse of credit?

The country entered a depression as the result of the stock market crash.


What is the flow chart for a program that finds two product numbers?

Since all decent programming languages have the multiplication operator, you simply multiply them. If you want to go into a bit more detail, it would be a bit like this: Ask user for number "a" Ask user for number "b" Calculate result = a * b Show result (End) Use the appropriate flow chart symbols for input, etc.


What is it called when you divide a number?

It is called division. A fraction is a shorthand display of the operation, and the end result of it is a quotient.


What program really works for cell phone tracking?

You can use most popular website for cell phone tracking is http://angrymobiles.com/.You just have to enter cell phone number and result will be display within seconds.This is totally free of cost.


Can anyone say you the hill climbing program in c language?

The hill climbing program is normally downloaded from software because of its encryption and coding. The packaging has the configuration code that must be entered in order to obtain access, and therefore it cannot be shared as a result.


Design step by steps algorithm on how to write the letter A and display the result?

Design step by steps algorithm on how to write the letter A and display the result


A c program for multiplication of two integers a and b?

/*PROGRAM TO ACCEPT TWO NUMBERS FROM THE USER AND PRINT THEIR MULTIPLICATION. */ #include&lt;stdio.h&gt; #include&lt;conio.h&gt; void main() { int a, b, c; // Declaration of Variables. Variables 'a' &amp; 'b' to hold first &amp; second number. And 'c' to hold result. clrscr(); // To clear the output screen every time program is executed. printf("\n Enter the first number : "); scanf("%d", &amp;a); // To accept the first number. printf("\n Enter the second number : "); scanf("%d", &amp;b); // To accept the second number. c = a*b; // Logic to get the product of the entered two numbers. printf("\n Multiplication of %d &amp; %d = %d", a, b, c); // Displaying result. getch(); // To hold the output screen. }


How do you display a symbol in front of a field result in excel?

You can display the currency symbol in front of a result in a cell by formatting the cell for currency. When you format the cell, you can choose the currency symbol you want to display.


How do you create a flowchart and program that will inputs 2 number then get the sum is odd number then sum will be added 10 otherwise sum will be subtract to 2 and print result?

int process (int a, int b) { int result = a + b;if (result % 2) { result += 10; } else { result -= 2; } return result; }