🔒 Closed Pa check namn ng code ko (C language)

Status
Not open for further replies.

PHC Go Youn Jung

Forum Veteran
ano kaya mali? 0.0000 lagi lumalabas na sagot
pero pag ginawa kong add or subracct gumagana naman.
ano kaya mali mga boss.
Screenshot 2022-11-10 100659.png
 
use float instead of double

C:
#include <stdio.h>

int main()

{
float cm, ft;
float result;


printf("Enter length in centimeter (cm.): ");
scanf("%f", &cm);

result = (cm * 0.0328084);

printf("%f cm. is %f ft. when you convert to feet.",cm,result);


return 0;

}
 
pass by reference ba? or pass by value?

use float instead of double

C:
#include <stdio.h>

int main()

{
float cm, ft;
float result;


printf("Enter length in centimeter (cm.): ");
scanf("%f", &cm);

result = (cm * 0.0328084);

printf("%f cm. is %f ft. when you convert to feet.",cm,result);


return 0;

}
goods na ito gamitan lang ng function just like sa program na pinakita ni ts
 
use float instead of double

C:
#include <stdio.h>

int main()

{
float cm, ft;
float result;


printf("Enter length in centimeter (cm.): ");
scanf("%f", &cm);

result = (cm * 0.0328084);

printf("%f cm. is %f ft. when you convert to feet.",cm,result);


return 0;

}
pass by reference ba? or pass by value?


goods na ito gamitan lang ng function just like sa program na pinakita ni ts
kailangan kasi function eh pero try ko

use float instead of double

C:
#include <stdio.h>

int main()

{
float cm, ft;
float result;


printf("Enter length in centimeter (cm.): ");
scanf("%f", &cm);

result = (cm * 0.0328084);

printf("%f cm. is %f ft. when you convert to feet.",cm,result);


return 0;

}
okay sana to boss kaso kailangan naka function yung formula eh
 
Status
Not open for further replies.

Similar threads

About this Thread

  • 9
    Replies
  • 467
    Views
  • 3
    Participants
Last reply from:
PHC Go Youn Jung

Trending Topics

Online now

Members online
1,117
Guests online
1,014
Total visitors
2,131

Forum statistics

Threads
2,277,954
Posts
28,980,038
Members
1,228,184
Latest member
Shinra09
Back
Top