Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- int function(int x){
- int result = 0;
- for(int i=1; i<x; i++){
- result = result + (i*x);
- }
- return result;
- }
- int main(void) {
- printf("%d\n",function(3));
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment