answersLogoWhite

0

#include

using namespace std;

int main()

{

int pods,beans;

float total;

cout<<''enter the number of pods";

cin>>pods;

cout<<'enter the number of beans";

cin>>beans;

total=pods+beans;

cout<

return 0;

}

User Avatar

Wiki User

15y ago

What else can I help you with?

Continue Learning about Engineering

How do you write a program that calculate factorial in javascript?

function factorial(n) { var x=1; while(n&gt;1) x*=(n--); return x; }


How to write a C language program to display the times table of any number entered and then prompt the user to try again I've done till the number table but I cant prompt the user to TRY AGAIN?

The simplest way is to add a loop around the ask-for-the-number, show-the-table routine. In pseudocode:while (1) { ask-for-the-number; show-the-table; }


How do you write a c program to convert binary to decimal by using while statement?

write a c++ program to convert binary number to decimal number by using while statement


Write a program that read phrase and print the number of lower-case letter in it using function of counting?

write a program that reads a phrase and prints the number of lowercase latters in it using a function for counting? in C program


Program in 'c' to find the LCM of any given five numbers?

Just write a method or function that calculates the LCM for two numbers at a time. Then calculate the LCM for the first two numbers, get the LCM of the result with the third number, etc.Just write a method or function that calculates the LCM for two numbers at a time. Then calculate the LCM for the first two numbers, get the LCM of the result with the third number, etc.Just write a method or function that calculates the LCM for two numbers at a time. Then calculate the LCM for the first two numbers, get the LCM of the result with the third number, etc.Just write a method or function that calculates the LCM for two numbers at a time. Then calculate the LCM for the first two numbers, get the LCM of the result with the third number, etc.

Related Questions

How do you write and debug an HTML document with a javascript function named calculate that uses a prompt dialog box to read a number of hours worked and a prompt dialog box to read the rateper hour?

Pseudocode: function calculate() { var hours = prompt("Enter number of hours"); var rate = prompt("Enter rateper hour"); }


Write a program that converts a decimal number to nearest integer?

prompt x floor(x + .5) -&gt; x disp x


How do you write a program that calculate factorial in javascript?

function factorial(n) { var x=1; while(n&gt;1) x*=(n--); return x; }


Write a program to calculate first?

int first= 1;


Write a program to convert a 2 digit BCD number into hexadecimal number?

Write a program to convert a 2-digit BCD number into hexadecimal


How to write a C language program to display the times table of any number entered and then prompt the user to try again I've done till the number table but I cant prompt the user to TRY AGAIN?

The simplest way is to add a loop around the ask-for-the-number, show-the-table routine. In pseudocode:while (1) { ask-for-the-number; show-the-table; }


Write a program that will calculate the number of kilometers traveled by a car per liter of fuel used by a car using qbasic?

just full it up when its at the E


2 Write a program to convert a 2-digit BCD number into hexadecimal?

WRITE A PROGRAM TO CONVERT A 2-DIGIT bcd NUMBER INTO HEXADECIMAL


How do you write a c program?

this is what the program says :i want to write a C program which reads in one value, the seed for the random number generator. Your program should then generate 100,000 simulated rolls of a pair of dice. The program should calculate and print the number of times the simulated roll of the dice was a 2, the number of times it was a 7 and the number of times it was a 12. Finally, print out the average (three decimal places) of all of the simulated rolls.Your program must have at least one user defined function called die which creates the roll of one die. This function should return an integer value between 1 and 6 inclusive. It should have no arguments.1- i cant figure out how to calculate how many time does the 2 , 7 , 12 print out .2- how to calculate the number in the 100,000 to be able to calculate the avg.3- i dunno how to create the function in the second part .


Write a program that will accept two numbers and find their sum anddifferences. If the sum is more than the difference, display the sum otherwisedisplay the difference. Pascal programming?

program SumAndDifference; var num1, num2, sum, difference: integer; begin write('Enter first number: '); read(num1); write('Enter second number: '); read(num2); sum := num1 + num2; difference := num1 - num2; if sum &gt; difference then written('The sum is greater: ', sum) else written('The difference is greater: ', difference); end. This program will prompt the user to enter two numbers, calculate their sum and difference, and then compare the two values. If the sum is greater than the difference, it will display the sum; otherwise, it will display the difference.


Write a program which takes any number of days from the user the program should display the number of years number of months formed by these days as well as the remaining days?

Write a program which takes any number of days from the user. the program should display the number of years, number of months formed by these days as well as the remaining days.


Write a program to calculate the area of a cylinder using a function?

give an example of calculation of mathematics