swap prog
Answers were Sorted based on User's Feedback
/* u r question is not clear but i proceed it as a swap of
two numbers*/
main()
{
int a,b,temp;
clrscr();
printf("enter two no's");
scanf("%d %d",&a,&b);
temp=a;
a=b;
b=temp;
printf("after swap no are:");
printf("%d %d" ,a,b);
getch();
} venugopal.palavalasa@gmail.com
}
Is This Answer Correct ? | 5 Yes | 0 No |
Answer / tayyab
By using recent two variables swap code will be
a=3;
b=5;
a=a+b; a=8
b=a-b; b=3
a=a-b; a=5
Is This Answer Correct ? | 6 Yes | 1 No |
Answer / ksrikar
a=9;
b=5;
a=a*b; // a=45
b=a/b; // b=9
a=a/b; // a=5
Is This Answer Correct ? | 3 Yes | 0 No |
How to swap two ASCII numbers?
write a c program, using for loop, that accepts and odds two numbers. The output must be the sum and the addens. This should be repeated 5 times while the first number is decremented by one and the second number is incremented by 1.
Wrie a function which returns the most frequent number in a list of integers. Handle the case of more than one number which meets this criterion. public static int[] GetFrequency(int[] list)
What output does this program generate as shown? Why? class A { A() { cout << "A::A()" << endl; } ~A() { cout << "A::~A()" << endl; throw "A::exception"; } }; class B { B() { cout << "B::B()" << endl; throw "B::exception"; } ~B() { cout << "B::~B()"; } }; int main(int, char**) { try { cout << "Entering try...catch block" << endl; A objectA; B objectB; cout << "Exiting try...catch block" << endl; } catch (char* ex) { cout << ex << endl; } return 0; }
Code for Easily Using Hash Table?
Code for Two Classes for Doing Gzip in Memory?
write a program that creates a sequenced array of numbers starting with 1 and alternately add 1 and then 2 to create the text number in the series , as shown below. 1,33,4,6,7,9,............147,148,150 Then , using a binary search , searches the array 100 times using randomly generated targets in the range of 1 to 150
How do I store linked list datas into an array?
write a program using virtual function to find the transposing of a square matrix?
Write an algorithm that receives a string and reverses it.
write a program in c++ to scramble a bmp image file using a scramble key 0x7c and an XOR logic. print out the original image, the scrambled image and the program. Note: the first 24bytes of a bmp file contain the header information of the file.
Hello, I am trying to write a program in c++ which accepts month and year from the user and prints the calender. So please tell me the algorithm and what is the calender logic.