Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
V
VHB C++ EN
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Rudi Buss
VHB C++ EN
Merge requests
!6
Update Exercise 2 - Farm.txt
Code
Review changes
Check out branch
Download
Patches
Plain diff
Closed
Update Exercise 2 - Farm.txt
oa07987/vhb-cpp-en:oa07987-main-patch-95536
into
main
Overview
0
Commits
1
Pipelines
0
Changes
1
Closed
Omkar Akolkar
requested to merge
oa07987/vhb-cpp-en:oa07987-main-patch-95536
into
main
6 months ago
Overview
0
Commits
1
Pipelines
0
Changes
1
Expand
0
0
Merge request reports
Compare
main
main (base)
and
latest version
latest version
d4a6fca4
1 commit,
6 months ago
1 file
+
18
−
0
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
Part 1/2. Variables, data types, operators, in-/Exercises/Exercise 2 - Farm.txt
+
18
−
0
Options
@@ -11,3 +11,21 @@ Both variables are to be entered in a dialog with the user via the console.
The revenue is then calculated from weight * daily price.
Print the revenue on the screen.
#inlcude <iostream>
using namespace std;
int main()
{
float weight;
float dailyprice;
float revenue;
cout << "Revenue for the Pig Sales; " << endl;
cout << "Weight: " << endl;
cin >> weight;
cout << "DailyPrice: " << endl;
cin >> dailyprice;
revenue = weight * dailyprice;
cout << " Revenue for the pig = " << revenue << endl;
}
\ No newline at end of file
Loading