Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
SEJM BLURWA
#include <iostream> using namespace std; int lrzedow,s,testy,x,y,tab[1020]; int main() { cin>>lrzedow; for(int i=1;i<=lrzedow;i++) { cin>>tab[i]; } cin>>testy; for(int i=1;i<=testy;i++) { cin>>x>>y; for(int i=x;i<=y;i++) { s=s+tab[i]; } cout<<s<<endl; s=0; } }
run
|
edit
|
history
|
help
0
How to access member function of a class using scope
Prime_Number_Cpp
FuktExam.cpp
map::swap()_30-Seconds-of-C++
obracanie tablicy
Rev Fact WIP
Permute
vertical sum
OneANOVA
ChiSq