Total members 11895 |It is currently Sun Dec 22, 2024 2:09 pm Login / Join Codemiles

Java

C/C++

PHP

C#

HTML

CSS

ASP

Javascript

JQuery

AJAX

XSD

Python

Matlab

R Scripts

Weka





write a program using function to swap the two numbers Programmer:  




Author:

dear , we don;t solve full assignments here , you have to give it a try ( best effort) anyway , this is one is simple

Code:
  int num1=34;
  int num2=35;
  int temp=0;

   temp=num1;
   num1=num2;
   num2=temp;


_________________
M. S. Rakha, Ph.D.
Queen's University
Canada


Author:
Mastermind
User avatar Posts: 2715
Have thanks: 74 time

Hi bro..can we swap two variables without operators? if yes how?


Author:
Beginner
User avatar Posts: 54
Have thanks: 0 time

without equal operator ?

_________________
M. S. Rakha, Ph.D.
Queen's University
Canada


Author:
Mastermind
User avatar Posts: 2715
Have thanks: 74 time

without arithmatic oprators..
But bro is it possible to swap without equal operator?


Author:
Beginner
User avatar Posts: 54
Have thanks: 0 time

how !!! i think it is impossible ? :)

_________________
M. S. Rakha, Ph.D.
Queen's University
Canada


Author:
Mastermind
User avatar Posts: 2715
Have thanks: 74 time
Post new topic Reply to topic  [ 6 posts ] 

  Related Posts  to : swap two numbers c++ program
 Swap Using Pointers     -  
 list swap in C++     -  
 SWAP images using JQuery just by using the src attribute img     -  
 add two 24-bit numbers (sum two numbers)     -  
 The harmonic mean of two numbers is given by     -  
 JProgressbar Sum of 'n' Numbers     -  
 Complex Numbers     -  
 The harmonic mean of two numbers is given by:     -  
 Complex numbers calculator (C++)     -  
 add sequence of decimal numbers     -  



cron





Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
All copyrights reserved to codemiles.com 2007-2011
mileX v1.0 designed by codemiles team
Codemiles.com is a participant in the Amazon Services LLC Associates Program, an affiliate advertising program designed to provide a means for sites to earn advertising fees by advertising and linking to Amazon.com