answersLogoWhite

0


Best Answer

// While this doesn't prompt the user for input, it does reverse the values' contents. $intA = '10';

$intB = '20';

$tmp = $intA;

$intB = $intA;

$intA = $tmp;

print $intA; // 20

print $intB; // 10 // An even quicker way is...

list($b,$a) = array($a,$b);

User Avatar

Wiki User

16y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: Write a program that asks the user to type two integers A and B and exchange the value of A and B?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

Write a program with a loop that lets the user enter a series of integers the user should enter -99 to signal the end of the series after the program should display the largest and smallest.?

#include<iostream.h> #include<conio.h> main() { int i,j; i=0; j=0; for(i=1;i<=5;i++) { if(i>j){ cout<"the value of i is="<<i; } else { cout<<"the value of j is="<<j; } } getch(); }


Write a program using recursion which should take two values and display 1st value raised to the power of second value?

Write a program using recursion which should take two values and display 1st value raised to the power of second value.


Program to exchange the value x and y using 3 variables?

temp = x; x = y; y = temp;


What is the integers value of 5'5?

The integer value is 5.


How many integers have an absolute value of 15?

Two. +15 and -15 are the only integers with an absolute value of 15.


Write a program using 8086 instructions to double a number?

There isn't a reason to write a complete program to do this; in any assembly language just shift the value 1 bit to the left to double it.


What is Exchange value and medicine of exchange?

What is exchange value and medicine of exchange


When adding 2 integers will the answer be positive?

When adding two integers, the answer will be positive if both integers are positive, or if one is negative but its absolute value is smaller than the absolute value of the positive integer.


The product of two integers is zero what do you know about the value of the least one of the integers explain?

At least one of the integers is negative.


Write a java script program to print first ten odd natural numbers in C?

Q.1 Write a program to print first ten odd natural numbers. Q.2 Write a program to input a number. Print their table. Q.3 Write a function to print a factorial value.


A c program to square matrix?

A C program to square matrix is a math problem. In the math problem you write down all the outer boundary values of matrix in a circle, then write down the inner value.


How do you know if fractions are integers?

Fractions are integers when their denominator is 1 or when the numerator has the same value as the denominator.