Write a program to input a floating point number and round it off to two pl
Places of decimal: 15
For Example:
INPUT: Enter a floating point number: 12.367
OUTPUT: Rounded off to two places of decimal:12.37
INPUT: Enter a floating point number: 14.563
OUTPUT: Rounded off to two places of decimal: 14.56
Write a nrogram to input two integers (say a and b) and interchange the
Answers
Answered by
3
Explanation:
Program to swap two numbers without third variable
#include<stdio.h>
int main()
{
int a=10, b=20;
printf("Before swap a=%d b=%d",a,b);
a=a+b;//a=30 (10+20)
b=a-b;//b=10 (30-20)
a=a-b;//a=20 (30-10)
Similar questions