Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

C

Name: t work 2010-11-13 11:19

What's wrong with this shit? It's supposed to multiply every line seperatly for example we have the array
123
456
789

it's supposed to do this: 1*2*3=6 ; 4*5*6=120; 7*8*9=504;

#include <stdio.h>
#include <stdlib.h>

int main ()
{
    int mas1[2][3]={{1,2,3},{4,5,6},{7,8,9}};
    int mas[100];
    int i,j,m,n,k;
    j=0;
    i=0;
    m=2;
    n=3;

    for(k=0;k<=m;k++)
    {
                    mas[k]= mas1[i][j] * mas1[i][j+1] * mas1[i][j+2];
                    i++;
                    printf("%d",mas[k],",\t");
    }

    system("PAUSE");
    return 0;
}

Name: Anonymous 2010-11-16 0:41

I'm going to rape you in the butthole if you ever use system("PAUSE") again.

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List