Search found 1 match

by Kinleyperker
Wed Feb 17, 2016 11:29 am
Forum: Volume 5 (500-599)
Topic: 573 - The Snail
Replies: 45
Views: 27922

Re: 573 - The Snail

Can anyone help me with this code...It's getting WA

#include<stdio.h>

int main()
{
int H=1, U, D, F, x;
float s, v, w;

while(H>0)
{
scanf("%d %d %d %d", &H, &U, &D, &F);

w = U*F;

if(H>0)
{
s = 0.00;

for(x=0; ; x++)
{
if(x) v = v - (w/100);
else if(!x) v = U;

s = s + v;

if(s>H ...

Go to advanced search