Write a complete program that creates an array of characters, 3 times
the size of ASCII table and itinializes the contents of the array to
correcponding ACSII values; when end of ACSII table is reached, you
should loop back to the beggining and start again.

Print the contents of the array, seporating the copies of ACSII table by
2 blank lines.


Note:
- You must utilize for loop structure.
- You may not combine assigment and printing out in one phaze, those
two must be seporate distinct stages.


Tips:
- use % as part of your for-loops to help you loop through the legal
range of an ACSII table

i couldnt finish it cuz i have 2 exams cal2 and physics 2 tomo.. if someone can help me it would be great..

>i couldnt finish it cuz i have 2 exams cal2 and physics 2 tomo..
Tough beans. Learn to start your work sooner or prioritize the homework that's most important and accept the failing grade that you deserve for the homework you're unable to finish. Do you think that when you get out into the real world and can't finish a project you can just palm it off on someone else and they'll happily do it for you? No, you'll get fired because you weren't able to do the job you were hired for. And you'll deserve it too.

can somone correct this prog..

#include <iostream>
using namespace std;
void main( )
{


   int[][] tableArray;


  int rows = 4;
  int columns = 5;


  tableArray = new int[rows][columns];


  for(int i = 0; i < rows; i++) {
    for(int j = 0; j < columns; j++) {
      if(i <= j)
        tableArray[i][j] = 1;
    }
  }


  for(int i = 0; i < tableArray.length; i++) {
    for(int j = 0; j < tableArray[i].length; j++) {
      System.out.print(tableArray[i][j] + "  ");
    }

    System.out.println();

i came up with this but its not compiling and how can i get output like this for ascii table

!@#$%... 12345... abcdefgh... ABCDBEFGH...


!@#$%... 12345... abcdefgh... ABCDBEFGH...


!@#$%... 12345... abcdefgh... ABCDBEFGH...

Edited 3 Years Ago by pyTony: fixed formating

>but its not compiling
I can't imagine why. Here's an idea, maybe it's because you can't seem to tell the difference between C++ and Java. :rolleyes:

I'd make an attempt to help you if I thought it would do any good.

>but its not compiling
I can't imagine why. Here's an idea, maybe it's because you can't seem to tell the difference between C++ and Java. :rolleyes:

lol...sorry, probably mean for me to be laughing, but i cant help it....

but yes, your getting your java and C++ mixed up..fix that and maybe that will help

#include <iostream>
using namespace std;
using std::endl;
int main (void)
{

char array = 256*3;
int arr [array];

for(int i=0; i<(array); i++)
arr = i%256;
cout<<"ascii table"<<endl;
return 0;
}


not copiling need help

ohk this loop is compling but i need another for loop to print out like this..

!@#$%... 12345... abcdefgh... ABCDBEFGH...


!@#$%... 12345... abcdefgh... ABCDBEFGH...


!@#$%... 12345... abcdefgh... ABCDBEFGH..


my new porg is sumthing like this

#include <iostream>
#include <iomanip>
using namespace std;

int main( int ac, char ** av)
{
int i;
cout << "ASCII TABLE"<<endl;
for( i=0; i<=126; i++){
cout << ((char) i);
}
return 0;
}


but i need some kinda for loop to print it.. can someone help me or just give me hint wut to do..

This article has been dead for over six months. Start a new discussion instead.