answersLogoWhite

0

swap (int *a, int *b) {

*a ^= *b;

*b ^= *a;

*a ^= *b;

}

User Avatar

Wiki User

14y ago

What else can I help you with?

Continue Learning about Basic Math

How do you write a program to factorial in PHP?

To write a program that calculates the factorial of a number in PHP, you can use a recursive function or an iterative approach. Here’s a simple example using a loop: function factorial($n) { $result = 1; for ($i = 2; $i <= $n; $i++) { $result *= $i; } return $result; } echo factorial(5); // Outputs: 120 This code defines a function that multiplies numbers from 2 up to the given number $n to compute the factorial.


How To write a java program to create three tier applications using servlets?

barsanabegam


Write Java program to find numbers from 50 to 100 which are divisible by 5?

Here's a simple Java program to find numbers from 50 to 100 that are divisible by 5: public class DivisibleByFive { public static void main(String[] args) { for (int i = 50; i <= 100; i++) { if (i % 5 == 0) { System.out.println(i); } } } } This program uses a for loop to iterate through numbers from 50 to 100 and checks if each number is divisible by 5 using the modulus operator. If it is, the number is printed to the console.


How you write log out code in php?

if you're using a session, you can simply use the unset function: unset($_SESSION); session_unset(); session_destroy(); good luck !


How do write a definition and give an example of the commutative property of addition using decimal numbers?

The commutative property states that given any two numbers, x and y,x + y = y + xThe property applies to all real numbers and complex numbers as well.2.3 + 4.5 = 6.8 = 4.5 + 2.3

Related Questions

How to write a C program to find largest 2 numbers using pointers?

program to find maximum of two numbers using pointers


Write a program that read phrase and print the number of lower-case letter in it using function of counting?

write a program that reads a phrase and prints the number of lowercase latters in it using a function for counting? in C program


Write a c program for matrix addition using function?

#include<


How do you write an assembly language program to find the sum of n numbers using array?

write an assembly language program to find sum of N numbers


How do you write a program to read set of numbers using by an array and display the ascending order of the given input numbers?

To write a C++ program to display the student details using class and array of object.


Write a Program to convert decimal number into hexadecimal no without using function and string?

This is not a question.


Write a program to calculate the area of a cylinder using a function?

give an example of calculation of mathematics


Can you write a program without using any semicolon inside the main function?

not possible dude


Write a program to find the product of two numbers using Halving and Doubling method?

i need this answer


Write a program large number and small number among n numbers by using If statement?

12


How do you write a program to factorial in PHP?

To write a program that calculates the factorial of a number in PHP, you can use a recursive function or an iterative approach. Here’s a simple example using a loop: function factorial($n) { $result = 1; for ($i = 2; $i <= $n; $i++) { $result *= $i; } return $result; } echo factorial(5); // Outputs: 120 This code defines a function that multiplies numbers from 2 up to the given number $n to compute the factorial.


How do you write a c program to find area of rectangle using function?

There will be a function in it like this: double RectangleArea (double a, double b) { return a*b; }