Question

Make a code that creates the following “output” using /t. Column 1 Column 2 2 1...

Make a code that creates the following “output” using /t.
Column 1 Column 2
2 1
3 2

Homework Answers

Answer #1

Code:

----------

#include <iostream>

using namespace std;

int main()

{

cout<<"Column 1\tColumn 2"<<endl;

cout<<"2\t\t1"<<endl;

cout<<"3\t\t2"<<endl;

//Here "\t" returns one tab

return 0;

}

Output :

--------------

Know the answer?
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for?
Ask your own homework help question
Similar Questions
1: A) Given the following vectorized code: >>x=[1:10]; >>f=x.^2+2; Rewrite this code using a for loop...
1: A) Given the following vectorized code: >>x=[1:10]; >>f=x.^2+2; Rewrite this code using a for loop that defines each element of f one at a time. Make sure to preallocate memory to f before filling each spot. B) See the following code. Rewrite the code in one line using the find function and a For loop. then write it again using a while loop x=[-1 3 7 2 4 0]; v=[]; for i=1:length(x) if x(i)<=2 v=[v, x(i)]; end end please...
solve the system X'={2 2, 3 1}X+{t 1}. (2 2 in column, 3 1 in column)
solve the system X'={2 2, 3 1}X+{t 1}. (2 2 in column, 3 1 in column)
What will be the output of the following code: x <- seq (1, 15, 2) for...
What will be the output of the following code: x <- seq (1, 15, 2) for (count in x) { print (count) }
Analyze the following Verilog code and write down its output as pictured in the code. module...
Analyze the following Verilog code and write down its output as pictured in the code. module blocking; reg [0:7] A, B; initial begin: init1 A = 3; #1 A = A + 1; // blocking procedural assignment B = A + 1; $display("Output 1: A= %b B= %b", A, B ); A = 1; #1 A <= A + 1; B <= A + 1; #1 $display ("Output 2: A= %b B= %b", A, B ); end endmodul
   1)T(n) = 27 T (n/3) + n3 2)Calculate the running time for the following code...
   1)T(n) = 27 T (n/3) + n3 2)Calculate the running time for the following code fragment. Algorithm test int counter, i, j; counter := 0; for (i:= 1; i < n; i*=2) { for (j:= 0; j < i; j++) { counter := counter +1 } } 3)Let f(n) = 2lg 8n + 3 be a function.
Following is a preview of the matrix x: Code: [,1] [,2] [,3] [1,] 1 3 5...
Following is a preview of the matrix x: Code: [,1] [,2] [,3] [1,] 1 3 5 [2,] 2 4 6 Write the code that return the output: [,1] [,2] [,3] [1,] 1 3 5 [2,] 2 4 6 [3,] 7 8 9
Analyze the following Verilog code and write down its output as pictured in the code. module...
Analyze the following Verilog code and write down its output as pictured in the code. module blocking; reg [0:7] A, B; initial begin: init1 A = 1; #1 A = A + 1; // blocking procedural assignment B = A + 1; $display("Output 1: A= %b B= %b", A, B ); A = 1; #1 A <= A + 1; B <= A + 1; #1 $display ("Output 2: A= %b B= %b", A, B ); end endmodule
Using for loop and if statement, write a MATLAB code to plot a graph for x(t)...
Using for loop and if statement, write a MATLAB code to plot a graph for x(t) as a function of time t in the range 0 to 12 in increment of 0.01 ?(?) = 1: 0 ≤ ? ≤ 1 2? − 1 1 ≤ ? ≤ 2 3 2 ≤ ? ≤ 3 −2.5? + 10.5 3 ≤ ? ≤ 5 −2 5 ≤ ? ≤ 6 4/3 ? − 10 6 ≤ ? ≤ 9 2 9 ≤...
1.    Given the following segment of code: (If there is nothing output, write None.) int x;...
1.    Given the following segment of code: (If there is nothing output, write None.) int x; int y; cin >> x; cin >> y; while (x > y) {     x -= 3;     cout << x << " "; } cout << endl;        a.    What are the output and final values of x and y when the input is 10 for x and 0 for y? [2, 2, 2]               Output                                                                                                                                                                                                    x = ______________                                                                                                                                                                                                   ...
Ali decides to make some pretty patterns using 12 indistinguishable balls. He creates a 12 ×...
Ali decides to make some pretty patterns using 12 indistinguishable balls. He creates a 12 × 12 grid to place the balls cones on. How many patterns can he make such that no two balls are in the same row or in the same column of the grid? If the balls are distinguishable, how many ways are there for Ali to place the balls on the 12 × 12 grid now, such that no two balls are in the same...
ADVERTISEMENT
Need Online Homework Help?

Get Answers For Free
Most questions answered within 1 hours.

Ask a Question
ADVERTISEMENT