Run Code
|
API
|
Code Wall
|
Users
|
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
Please
log in
to post a comment.
SpiralMatrix
A • Potato Sacks
c++ car racing game
Caminho das Pontes
stack::swap_30-Seconds-of-C++
12hours Clock c++
3
CAE C++ Day 3 tests
Przesylka
TupleOfFunctions
Please log in to post a comment.