Forum: C Oct 8th, 2004 |
| Replies: 20 Views: 5,099 I actually worked out the exercise with a double array , as you said ( a[5][80 ). But I was just churious about mohammad's version . :rolleyes: |
Forum: C Oct 8th, 2004 |
| Replies: 20 Views: 5,099 I want it with #include <iostream> and all the rest ( cout & cin) . This one doesn't work:
#include <iostream>
#include <conio.h>
using namespace std;
main()
{ char *a[5]; int i;... |
Forum: C Oct 6th, 2004 |
| Replies: 20 Views: 5,099 Indeed , I haven't tested them until now. It seems like both versions give the same result ...
My guess is: i should start from 0? :p |
Forum: C Oct 6th, 2004 |
| Replies: 20 Views: 5,099 Hehe. :) It should be like this:
for(i=1;i<=n;i++)
NOT
for(i=1;i<=n;++i) |
Forum: C Oct 5th, 2004 |
| Replies: 20 Views: 5,099 It works fine as for(i=1;i<=n;i++) . Trust me. :lol: |
Forum: C Oct 5th, 2004 |
| Replies: 20 Views: 5,099 It works , altought the exercise says that I should use two arrays , one for the names and one for the grades. Oh well , it's important that it works ... :)
Thank you very much! |
Forum: C Oct 5th, 2004 |
| Replies: 20 Views: 5,099 Do you mean something like
a[1][1] = "Victor";
a[2][2] = "Jose"; ???
I mean:
char a[30][30],i,n;
cout<<"n= "; cin>>n;
for(i=1;i<=n;i++) { cout<<"Give "<<i<<"-st name: "; cin>>a[i]; }
... |
Forum: C Oct 5th, 2004 |
| Replies: 20 Views: 5,099 As this is my first post on this forum I want to say "Hello!" to everybody and I hope that we'll help each other as much as we can and we'll be very good friends. :)
So, this is my problem ( a... |