You are here:

C++/------------------------- ...


Followup To
Question -
Hello, need a help. have to calculate a formula in C and print out results. My printer connected to USB port.Win Me, Visual C++,
Answer -
what formula you want to calculate?
The formula is not a big deal Zij=Xi*pow(sin(Yj),3)...and so on, (two dim. array...) but the problem is how to send data (the result)to the printer(using PRINTF() to send streem on to display or file) but to get things printed out .... Thanks a lot.

Zij=Xi*pow(sin(Yj),3) can be done in C/C++ like:

double temp, Z[10,20], Z[10], Y[20];
temp = sin(Y[j]);
Z[i][j] = X[i] * (temp * temp * temp);

you can also use the power function, but the above is easier.

To print, just use normal printf or cout functions that display on screen, but then redirect the output to printer (from command prompt). See below:

C:\> myprog > PRN


All Answers

Answers by Expert:

Ask Experts




You may ask me about simple to complicated C/C++ programming methods/style and most like questions about network programming in C++.


I'm a professional programer in C++ and network/internet programming.

©2016 All rights reserved.