Page 4 of 4

Re:10071 Back to High School Physics

Posted: Fri May 27, 2011 10:57 am
by rahat khan
#include<stdio.h>
int main()
{
int s,v,t;
scanf("%d %d",&v,&t);
s=v*t;
s=s*2;
printf("%d\n",s);
return 0;
}

Re: Re:10071 Back to High School Physics

Posted: Mon Nov 04, 2013 12:08 pm
by nova4409
#include <iostream>
using namespace std;

int main(){
int v,t,s;
while(scanf("%d %d",&v,&t)==2){
if(0<=t<=200 && -100<=v<=100){
s=v*t*2;
cout<<s<<endl;
}}

}

Re: Re:10071 Back to High School Physics

Posted: Tue Nov 05, 2013 12:51 am
by brianfry713
That code won't compile.

Re: Which problem is the easiest problem of this site?

Posted: Fri Jan 23, 2015 8:22 pm
by liya
prob no:10071....it's getting RE....what's the problem?here is my code.....

Code: Select all

#include<stdio.h>
int main()
{
   int v,t,s;
   while((scanf("%d %d",&v,&t))!=EOF)
   {
       s=v*t*2;
   printf("%d\n",s);
   }



}

Re: 10071 - Back to High School Physics

Posted: Fri Jan 23, 2015 9:39 pm
by brianfry713
Next time post in the correct thread.
Try adding return 0; at the end of your code.