June 2nd, 1999, 07:17 AM
I am trying to get this program to print to screen ut it doesnt???
Could anyone tell me why.
Or is there a better way of doing it.
All I want to do is see the result on screen.
I am using ms visiul c++ 6.
I am new arrays so I might be missing something but i dont know what.
Please help me
Thank You in advance.
ps: Is there a way of putting a loop to also get the results out without
typing each array one by one.????
#include <iostream.h>
#include <stdio.h>
#include <conio.h>
main()
{
int num[7];
num[0]=47;
num[1]=( num[6]+1 );
num[2]=0;
num[3]=( num[0]+num[1]+num[5]+num[6] );
num[4]=0;
num[5]=( num[0]-13 );
num[6]=65;
cout<<num[0]<<num[1]<<num[2]<<num[3]<<num[4]<<num[5]<<num[6];
getch();
return 0;
}
Could anyone tell me why.
Or is there a better way of doing it.
All I want to do is see the result on screen.
I am using ms visiul c++ 6.
I am new arrays so I might be missing something but i dont know what.
Please help me
Thank You in advance.
ps: Is there a way of putting a loop to also get the results out without
typing each array one by one.????
#include <iostream.h>
#include <stdio.h>
#include <conio.h>
main()
{
int num[7];
num[0]=47;
num[1]=( num[6]+1 );
num[2]=0;
num[3]=( num[0]+num[1]+num[5]+num[6] );
num[4]=0;
num[5]=( num[0]-13 );
num[6]=65;
cout<<num[0]<<num[1]<<num[2]<<num[3]<<num[4]<<num[5]<<num[6];
getch();
return 0;
}