Dyskusje Q&A
Newb
2 głosów
3 odpowiedziproblem with asterisk
1 Głos
1 OdpowiedźHaha I'm getting better
0 głosów
2 odpowiedziWho wants Lua script?
3 głosów
2 odpowiedzihelp
1 Głos
4 odpowiedzihey 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 Głos
8 odpowiedziAI or web ?
1 Głos
1 OdpowiedźPython Course Progression
0 głosów
2 odpowiedziPathway
1 Głos
1 Odpowiedźi need help
1 Głos
3 odpowiedziPlease help me
0 głosów
1 OdpowiedźWhat exactly is Java Script?
0 głosów
2 odpowiedziPopularne dzisiaj
Time up code for data revision
0 Votes
Best Python Calculator Code
1 Votes
I want to learn why this error occurs in "while loop" function of Pythone.Can someone explain to me?
1 Votes
Animation
2 Votes
Clean Code
2 Votes
New code
1 Votes
While or for loop
0 Votes