Results 1 to 7 of 7
Thread: C++
Hybrid View
-
9th November 2010 20:47 #1Registered User
Join Date: Nov:2010
Location:
Posts: 3
C++
-

"x" "n", "n" 1. , 17. , .
void main(){
double i,x,n,s=17,x1=1;
cout<<"x:"; cin>>x;
cout<<"n:"; cin>>n;
for (i=n; i<=n; i--)
{x1=x1*x;
s=s+x1;}
cout<<s;
}
, , :
void main(){
double i,x,n,s=17,x1=1;
cout<<"x:"; cin>>x;
cout<<"n:"; cin>>n;
for (i=1; i<=n; i++)
{x1=x1*x;
s=s+x1;}
cout<<s;
}
, "x" 1, "n".
, .
-
9th November 2010 20:56 #2
-
10th November 2010 12:08 #3Registered User
Join Date: Nov:2010
Location:
Posts: 3
?
-
10th November 2010 12:41 #4
-
10th November 2010 14:40 #5
-
10th November 2010 14:43 #6
-
10th November 2010 14:46 #7-==-
Join Date: Sep:2003
Location:
Posts: 6,444




Reply With Quote

Lenovo ThinkPad 15 IdeaPad 15
5th May 2023, 22:16 in