Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- int main()
- {
- int x = 10, y = 0;
- int i;
- int z = x;
- for (i = 0; i < x; i++)
- {
- y = y + (z * z);
- z--;
- }
- cout << "Ilosc cegiel w piramidzie 10x10 wynosi: " << y << endl;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement