Thread: arrays proplem
View Single Post
Join Date: Dec 2007
Posts: 16
Reputation: bis student is an unknown quantity at this point 
Solved Threads: 0
bis student's Avatar
bis student bis student is offline Offline
Newbie Poster

Re: arrays proplem

 
0
  #6
Dec 29th, 2007
before every thing thank you for helping , and Im asking if these answer is right :
  1. # include <iostream>
  2. using namespace std ;
  3. int main ()
  4. {
  5. int alpha[50];
  6. for (int i=0;i<25;i++)
  7. {
  8. alpha[i]=i*i;
  9. cout<<alpha[i]<<" ";
  10. for(i=25;i<50;i++)
  11. {
  12. alpha[i]=3*i;
  13. cout<<alpha[i]<<" ";
  14. }
  15. return 0
  16. }
also I have question how can I print 10 elements per line if I had 2 loop
and thank you very much ,
Reply With Quote