Q&A Discussions
Make a calculator
-3 Votes
2 Answershey 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 Vote
8 AnswersMac Os vs Windows?
1 Vote
4 AnswersChallenge challenge
2 Votes
3 AnswersWhy this output occur?
2 Votes
3 AnswersStar Wars font?
0 Votes
2 AnswersDoes the Certificate help
2 Votes
2 AnswersHow to create some code?
0 Votes
1 AnswerFunctions help please
0 Votes
1 AnswerC# program on SoloLearn
0 Votes
2 AnswersHow to solve it?
0 Votes
1 AnswerWarning show up
0 Votes
1 AnswerHot today
Web Development
3 Votes
Cybersecurity techies
5 Votes
Please complete this code.
0 Votes
App Development
0 Votes
What's wrong in my code?
2 Votes
Please answer.
0 Votes
What's wrong with code?
0 Votes
Introduction of html
0 Votes
CSS or Tailwind
1 Votes