Write a program to compute the following z i j when i vari

Write a program to compute the following z = i * j when i varies from 1 to 10 and j varies from 1 to 10. Make sure to print the output on one line. What is output by the following code? char letter1 = \'?\'; char letter2 = \'?\'; letter1 = \'y\'; while (letter1 leftarrow \"z\"){letter2 = \'a\'; while (letter2 leftarrow \"e\"){cout

Solution

#include <iostream>
using namespace std;

int main()
{
   int z;
   for(int i=1,j=1;i<=10;i++,j++)
   {
       z=i*j;
       cout<<z<<\' \';
   }
   cout<<endl;

   return 0;
}

For the second question the output is \"y a y b y c z a z b z c \"

 Write a program to compute the following z = i * j when i varies from 1 to 10 and j varies from 1 to 10. Make sure to print the output on one line. What is out

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site