Răspuns:
#include <iostream>
using namespace std;
int main()
{
float n,R;
cin>>n;
R=n*(n+1)/2;
cout<<R;
}
Explicație:
Se aplica pentru C++
Metoda este prin suma lui Gaus
Show life that you have a thousand reasons to smile
© Copyright 2024 DOKU.TIPS - All rights reserved.
Răspuns:
#include <iostream>
using namespace std;
int main()
{
float n,R;
cin>>n;
R=n*(n+1)/2;
cout<<R;
}
Explicație:
Se aplica pentru C++
Metoda este prin suma lui Gaus