Hi Friends ! You are on HR Developers website. Here you can find the codes of different languages like c ,c++ , java, pyton and many other languages.
#include<iostream>
using namespace std;
int main()
{
int i,n,t=1;
int sum=0;
cout<<"please enter the number of series:";
cin>>n;
for(i=1; i<=n; i++)
sum=sum+t;
cout<<t;
t=t*10+1;
cout<<endl;
}
cout<<"the sum is:"<<sum;
No comments:
Post a Comment