Choto Cheeta
Rebooting
r those compailers Free??
humm... may b not as Softmart is selling them....
humm... may b not as Softmart is selling them....
The Incredible said:7. if a five digit number is entered thru keyboard then write a programm to reverse da number(e.g., 12345 reverse 54321)
#include<stdio.h>
#include<conio.h>
void main()
{
int num,r;
clrscr();
printf("Enter a number");
scanf("%d",&num);
printf("The reversed number is");
cd:
r=num%10;
printf("%d",r);
num=num/10;
if(num>0)
goto cd;
getch();
}
#include<math.h?
#include<iostream.h>
#include<conio.h>
void main()
{
int a,b,c=0;
cout<<"Enter the five digit number = ";
cin>>a;
b=a%10;
c=c*10+b;
a=a/10;
b=a%10;
c=c*10+b;
a=a/100;
b=a%10;
c=c*10+b;
a=a/1000;
b=a%10;
c=c*10+b;
cout<<"Reversed Digit = "<<c;
getch();
}
#include<iostream.h>
#include<conio.h>
void main()
{
clrscr();
int x,n,rev=0,z;
cout<<"\nEnter number to be reversed:";
cin>>n;
x=n;
while(n!=0)
{
z=n%10;
n=n/10;
rev=(rev*10)+z;
}
cout<<"\The reverse of "<<x<<" is "<<rev;
getch();
}
#include<iostream.h>
#include<conio.h>
#include<math.h>
void main()
{
clrscr();
float p,r,n,ci;
cout<<"\nEnter principal:";
cin>>p;
cout<<"\nEnter rate:";
cin>>r;
cout<<"\nEnter time:";
cin>>n;
ci=p*pow((1+(r/100)),n);
cout<<"\nThe compound interest is: "<<ci;
getch();
}