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
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)
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...
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) }
What will be the output of the following code? #include <iostream> using namespace std; int main()...
What will be the output of the following code? #include <iostream> using namespace std; int main() {    char *s = "hello";    char *p = s;    cout << *(p+3) << " " << s[1] << endl; }
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.
Create an m-file myidftloop.m that takes as input a column vector Fr of DFT co- efficients...
Create an m-file myidftloop.m that takes as input a column vector Fr of DFT co- efficients and produces as output the corresponding column vector fk of samples, according to the formula 1 N0−1 2πrk fk= ?FrejN0 , k=0,1,...,N0−1. Again, your code should automatically determine N0 based on the length of the input vector Fr. To compute the inverse DFT, you should use a nested loop. Hand in your m-file and make sure it is clearly documented. Validate your m-file by...
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
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 ≤...
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