Sesiones de PyR
hey guys, I've been trying to work out the formula 'v=I*r'. But whenever I run the program and input values for I and r, it doesn't give the right answer.
This is the code
#include <iostream>
using namespace std;
int main() {
int i,r;
int v = i*r;
cout<<"what is the value of i?\n";
cin>>i;
cout<<"what is the value of r?\n";
cin>>r;
cout<<"voltage ="<<v<<endl;
return 0;
}
p/s: I'm new to programming
1 Voto
8 RespuestasHow can I make a choose?
0 Votos
1 RespuestaRadio type in HTML
0 Votos
1 RespuestaStyling Checkboxes???
0 Votos
1 RespuestaHelp mee
0 Votos
2 RespuestasWhy not normal I/O
0 Votos
1 RespuestaPlease help !
0 Votos
2 RespuestasContinuous problem
1 Voto
1 RespuestaPython question
0 Votos
1 RespuestaEn tendencia hoy
X velocity
0 Votes
Files not linking in C++
0 Votes
And... Who is the staff then?
2 Votes
I am a super beginner
0 Votes
Web Dev
0 Votes
Pls give me an idea
1 Votes
How this program executes?
0 Votes