Dyskusje Q&A
What is the data type of cin?
7 gÅosów
55 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 odpowiedzihelp me on this code:
1 GÅos
3 odpowiedzi6.1 c++
0 gÅosów
3 odpowiedziWhat's the problem of my code
0 gÅosów
3 odpowiedziInput and output
-3 gÅosów
5 odpowiedziWhat is cin?
0 gÅosów
5 odpowiedzic++ user input
0 gÅosów
2 odpowiedziconsole input activation
0 gÅosów
8 odpowiedziUser input on SoloLearn anoys me...
13 gÅosów
8 odpowiedziâCinâ input in C++
1 GÅos
1 OdpowiedźTaking inputs in c/c++
3 gÅosów
4 odpowiedziBuffer
1 GÅos
4 odpowiedziPopularne dzisiaj
Python
2 Votes
TICTACTOE
1 Votes
Learn python
2 Votes
Error
0 Votes
BIG DOUBTð€ð€ð€ð€
2 Votes
Need help (French)
1 Votes
Help for study
0 Votes
Spying on me
1 Votes
Where's PHP and Ruby courses?
1 Votes