Write a program to print the swapping in two no and using
three variable.
Answers were Sorted based on User's Feedback
Answer / guest
int a=10,b=20;
a=a+b;
b=a-b;
a=a-b;
S.o.pln(a);
S.o.pln(b);
Is This Answer Correct ? | 17 Yes | 4 No |
Answer / saiteja gangisetty
#include<stdio.h>
void main()
{
int a,b,temp;
printf("enter a, b values");
scanf("%d%d",a,b);
temp=a;
a=b; (or) // b=a*b/a=b;
b=temp;
printf("a=%d and b=%d",a,b);
}
Is This Answer Correct ? | 7 Yes | 0 No |
Answer / anshuman jha
#include<iostream.h>
#include<conio.h>
void main()
{
int a,b,c;
clrscr();
cout<<"Enter the two different no :";
cin>>a>>b;
cout<<"After swapping :"<<a<<b;
c=a;
a=b;
b=c;
cout<<"Before swapping :"<<a<<b;
getch();
}
Is This Answer Correct ? | 9 Yes | 4 No |
Answer / manasa bugude
import java.util.Scanner;
public class SwappMethod {
public static void main(String[] args)
{
int a,b,c,d;
Scanner scn=new Scanner(System.in);
System.out.println("enter the value of a,b and c");
a=scn.nextInt();
b=scn.nextInt();
c=scn.nextInt();
System.out.println("before swapping numbers:"+a+" "+b+" "+c);
d=a;
a=b;
b=c;
c=d;
System.out.println("after swapping number:"+a+" "+b+" "+c);
System.out.println();
}
}
Is This Answer Correct ? | 0 Yes | 0 No |
Answer / anonymous
import java.util.*;
class S3v
{
public static void main(String args[])
{
int a,b,c;
Scanner s=new Scanner(System.in);
a=s.nextInt();
b=s.nextInt();
c=a-b;
a=a-c;
b=b+c;
System.out.print(a+" "+b);
}
}
Is This Answer Correct ? | 0 Yes | 0 No |
Who created stl?
Give the output of the following program main() {int ret; ret=fork();ret=fork();ret=fork();ret=fork(); if(!ret) printf("sun"); else printf("solaris");
how to use C++?
What is stl stack?
Do you like to Submit Questions in Bulk under Same Category?? Then use our Bulk ListerDo you like to Submit Questions in Bulk under Same Category?? Then use our Bulk Lister
What are the different types of stl containers?
Describe the My Computer and My Documents folders; identify the elements that are present in every Window.
What is stl in c++ with example?
Q1. A. What is unary operator? List out the different operators involved in the unary operator. B. What is an adjust field format flag? Q2. A. Distinguish between a # include and #define. B. Can a list of string be stored within a two dimensional array? Q3. A.Explain how a pointer to function can be declared in C++? B.List the merits and demerits of declaring a nested class in C++? Q4. A. What are the syntactic rules to be avoid ambiguity in multiple inheritence? B. Explain the operation of overloading of an assignment operator. Q5. A. Explain how the virtual base class is different from the conventional base classes of the opps. B. Explain how an exception handler is defined and invoked in a Program. Q6. A. What is a binary file? List the merits and demerits of the binary file usagein C++. B. Write short notes on Text Manipulation Routines. C. Write bites in Turbo c++ Header (“Include”) Files.
0 Answers GE, Infosys, Microsoft, NIM,
a program using one dimensional array that searches a number if it is found on the list of given input numbers given by the user and locate its exact location in the list.
please visit this site you'll find my question this is my homework please answer it if you can http://easyscience.org/ib/lofiversion/index.php/t36168.html
What is stl language?