answersLogoWhite

0


Best Answer

x -=y;

User Avatar

Wiki User

14y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: Write a program to subtract integer y from integer x?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

Write a program that converts a decimal number to nearest integer?

prompt x floor(x + .5) -> x disp x


How would you write subtract the sum of 2 and y from x?

x - (y + 2)


Program to find product of three consecutive numbers?

dim x as integerdim y as integerdim z as integeron error goto Errorhandleruser input "Type first integer"x = user inputuser input "Type second integer"y = user inputuser input "Type third integer"z = user inputif z = 2+x and if y = 1+x thenprint "These numbers are consecutive!"print "Their product is" x*y*zelseif z 2+x or if y 1+x thenprint "These numbers are not consecutive."endifgoto quitErrorhandler: Print error codequitThis is about as stripped down a program as you can write. Depending on the scripting language, you will have to re-write the syntax to comply with that language's rules for syntax and commands.


Write Four different java statement that each add to integer variable x?

++x; x++; x += 1; x = x + 1;


What lists all the integer solutions of the equation x equals 10?

The person or program that solves the equation does.


How do you write a pseudocode program for finding out x to the power of y?

X**y


Write a c program that will exchange the values of x and y after the statement executed x is equal to y and y is equal to x?

what is a program x and y


Is x plus 1 considered a consecutive even integer?

x + 1 would be a consecutive integer where x is an integer.


Can you get a zero if you subtract a negative integer and a positive integer?

Short answer: Yes. Long answer: it depends on the order. If x is negative and y is positive, then x-y<0; y-x>0 (this second one is only correct if |y|<>|x|). And if |y|=|x| then y-x=0 (this is the one you're looking for, where x and y are equal, but y is positive and x is negative). Finally, if you know if |y|=|x| or |y|<>|x| then y-x>=0


How does one write an algorithm that rounds off a decimal point to the nearest integer?

double round (double x) return (int) x + 0.5;


Is 2x plus 2 even integer?

Only if x is already an integer. For any integer x, 2x + 2 will be an even integer.


A number less 15 write as an algebraic expression?

x-15, x represents the unknown number, and to have 15 less you would simply subtract 15 from x.... therefore your answer is x-15