Computer Science, asked by Zooeydinh2011, 10 months ago

Write a program to input two unequal numbers display the number after swapping their values in the variable without using 3rd variable
Sample input a=23,b=56
Sample output a=56,b=23

Answers

Answered by arinwal
0

Answer:

In the context of relational databases, a tuple is one record (one row). The information in a database can be thought of as a spreadsheet, with columns (known as fields or attributes) representing different categories of information, and tuples (rows) representing all the information from each field associated with a single record.

Answered by AskewTronics
0

Swapping Program in c :

Explanation:

#include <stdio.h>//header file.

int main()//main function.

{

  int a,b;//variable declaration.

  printf("Enter the value of a and b"); //print the user message.

  scanf("%d %d",&a, &b);//take the input from the user

  a=(a+b)-(b=a);//operation to swap the number.

  printf("%d %d",a,b); //print the value after swapping.

   return 0;

}

Output:

  • If the user gives input as 4,5 then the output is 5,4.
  • if the user gives input as 6,7 then the output is 7,6.

Detailed explantion :

  • The above code is in c language, in which the first line is used to render a message to the user.
  • Then the second line is used to take the input from the user.
  • Then swapping operation is excuted and print the value of a and b variable after swapping.

Learn More:

  • C program : https://brainly.in/question/12809215
Similar questions