Results 1 to 3 of 3
Thread: c++
Hybrid View
-
18th May 2009 22:05 #1
c++
:
1/1! + 1/2! + 1/3! +....+ 1/n!
To , . .#include<iostream>
using namespace std;
int main()
{
double Suma=0;
double Chislo;
int n;
int x=1;
cout<<"Vyvedete n:";cin>>n;
for(int i=1; i<=n; i++)
{x=x*i; Chislo=1.0/x; Suma+=Chislo;}
cout<<"Rezultat: "<<Suma<<endl;
system ("pause");
return 0;
}Config: Ryzen 3700x / Gigabyte x570 Gaming X / RX480 Strix 1400@2250 / 2x8gb Corsair Vengeance / Seagate Barracuda 1Tb + 256gb OCZ Trion / SuperFlower Leadex II Gold 750w / BeQuiet B801 / LG 23MA53 + Philips 170c / Logitech G502 / CM QuickFire TK
Acer Predator G9-593 I7 7700HQ + GTX1070
-
18th May 2009 22:10 #2
double 'x'. int n=13.
, . .
"640K ught to be enough for anybody" - Bill Gates, 1981
::Machine specs::Fract::AGG::::Baileys::blog::YouTube channel
-
19th May 2009 14:25 #3
.
Config: Ryzen 3700x / Gigabyte x570 Gaming X / RX480 Strix 1400@2250 / 2x8gb Corsair Vengeance / Seagate Barracuda 1Tb + 256gb OCZ Trion / SuperFlower Leadex II Gold 750w / BeQuiet B801 / LG 23MA53 + Philips 170c / Logitech G502 / CM QuickFire TK
Acer Predator G9-593 I7 7700HQ + GTX1070




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