0

Hi!
I want to learn C programming.
I have problem whit print out.
if I have:

double    value_1;
int       value_2;
// how do I print out double ....?
printf(?????)

if I have

int A=5;
double B=10.5;
result=(double) A/B
// the result type is double but how do I print it out.
printf(????);
2
Contributors
1
Reply
2
Views
12 Years
Discussion Span
Last Post by Dave Sinkula
0
#include <stdio.h>

int main()
{
   int A = 5;
   double B = 10.5;
   double result = A / B;
   printf("result = %f\n", result);
   return 0;
}
This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.