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()
{
long int i,j,n,t=9;
int sum=0;
cout<<"enter the number of term:";
cin>>n;
for(i=1; i<=n; i++)
sum=sum+t;
cout<<t<<endl;
t=t*10+9;
}
cout<<"sum of the series:"<<sum<<endl;
No comments:
Post a Comment