#include<iostream>
using namespace std;
#include<conio.h>
int main ()
{
int i,temp = 0;
cout<<"Enter a +ve 5 digit number :";
cin>>i;
if (( i <= 99999 ) && ( i > 9999 ))
{
cout<<(i/10000) + 1;
cout<<((( i/100) % 100)/10) + 1;
cout<<(( i/100) % 10 ) + 1;
cout<<((i % 100) / 10) + 1 ;
cout<<(i % 10) + 1;
}
else
cout<<"\n Pleas enter +ve five digit number";
getche();
return 0;
Understandable C and C++ programming tutorials, compiler reviews, source code, tips and tricks.
*/
}
using namespace std;
#include<conio.h>
int main ()
{
int i,temp = 0;
cout<<"Enter a +ve 5 digit number :";
cin>>i;
if (( i <= 99999 ) && ( i > 9999 ))
{
cout<<(i/10000) + 1;
cout<<((( i/100) % 100)/10) + 1;
cout<<(( i/100) % 10 ) + 1;
cout<<((i % 100) / 10) + 1 ;
cout<<(i % 10) + 1;
}
else
cout<<"\n Pleas enter +ve five digit number";
getche();
return 0;
/* Letuswithc:
this page is designed to help you learn C or C++.Understandable C and C++ programming tutorials, compiler reviews, source code, tips and tricks.
*/
}
No comments:
Post a Comment