why i couldnt get expected output? what's wrong?
C++
#include
int main(){
float t=3.0;
const g = 10;
float D = 1/2*g*t*t;
printf("Distance is %f",D);
return 0;
}why i couldnt get expected output? what's wrong?
#include
int main(){
float t=3.0;
const g = 10;
float D = 1/2*g*t*t;
printf("Distance is %f",D);
return 0;
}Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend4days leftRegister
Sachin SinghRank #66 · 26.2K reputationPosted Jul 10, 2021, 2:29 AM EDT
Rajanikant HawaldarRank #108 · 20.5K reputationPosted Jul 10, 2021, 2:55 AM EDT
Suri104 reputationPosted Jul 10, 2021, 3:32 AM EDT