//program to swap two numbers using third variable called 'temp'
#include <stdio.h>
void main()
{
float temp,a=18.57,b=19.47;
printf("\n values of a and b before swapping are %f and %f respectively",a,b);
temp=a;
a=b;
b=temp;
printf("\n values of a and b after swapping are %f and %f respectively",a,b);
}
#include <stdio.h>
void main()
{
float temp,a=18.57,b=19.47;
printf("\n values of a and b before swapping are %f and %f respectively",a,b);
temp=a;
a=b;
b=temp;
printf("\n values of a and b after swapping are %f and %f respectively",a,b);
}
output ఇలా వచ్చె
values of a and b before swapping are 18.570000 and 19.469999 respectively
values of a and b after swapping are 19.469999 and 18.570000 respectively
values of a and b after swapping are 19.469999 and 18.570000 respectively
కామెంట్లు
కామెంట్ను పోస్ట్ చేయండి
దయచేసి మీ సలహాలను సూచనలను స్పష్టంగా పేర్కొనగలరు. plz see that ur comments are 'acceptable' in a value based society.