ok i have this program that im trying to make that outputs the ascii character and its value iv got the following program but instead of going "a = 65 b = 66" it goes "abc = 65 = 66 = 67"
#include <stdio.h>
#include <iostream.h>
int i=0;
int j=0;
int ascii_value=1;
//////////////////////////////////////
// //
// main function //
// //
//////////////////////////////////////
int main()
{
while(i<255) //set the number of characters to display
{
while(j<3) //how many characters to display per line
{
if(i>=255) //if i is greater than 255 exit
{
return 0; //exit
}
cout<<" = "<<ascii_value; //print the "." form of the ascii text
putchar(i); //print the char
i++; // increase the ascii char we are on
ascii_value++; //increase its '.' format
j++; //increase the 3 to a line loop
}
j=0; //reset the 3 to a line loop
i++; //increase the ascii char again
cout<<endl; /start printing on new line
}
return 0; //exit program
}