Q&A Discussions
Write a python program which will ask user to enter 3 numbers. Your program will output the sum and average of these 3numbers.your program will also output the largest number, the smallest number of these three. For exampleif user enter 2,10,3 than your program will output,
For number 2,10,3 sum is 15,average is 5,the largest number is 10 and the smallest number is 2.
-1 Vote
4 AnswersWrite a program to return the area of Geometricshapes square and rectangle. Area of square is side*side, rectangle is length*breadth. The controlling class should display the following menu and respond to the user’s selection
Mean
1. Calculate area of square
2. Calculate area of rectangle
3. Quit
Enter your choice (1-3):
0 Votes
3 AnswersWhen I enter two numbers the sum is displayed.. but when I input character as yes not y... Then it goes into an infinite loop... can anyone explain why?
int a,b;
char ch;
do
{
cout<<"Enter two numbers: ";
cin>>a>>b;
cout<<"The sum is "<<a+b
<<"\nDo you want to try again (y/n): ";
cin>>ch;
}while(ch=='Y'||ch=='y');
0 Votes
4 AnswersIs it possible to make my code run without having to press Enter on my IDE? For example: if I'm making a calculator and I want the calculations to be made as soon as I press "=" after typing the numbers and the operator?
Say I wanted to add two numbers: can it calculate automatically as soon as I write "2+3=" without having to press Enter?
0 Votes
5 Answersusing a while loop create a guessing game program that keeps asking the user to enter a number until the user enters the number 7. You will need to create and initialise an int variable to zero. You can then use this variable as the condition in your while loop ( while the number is not equal to seven) Then in the while loop ask the user to enter a number and store the number entered in the number variable that is in the conditions of your loop.
0 Votes
1 AnswerWhen I enter two numbers the sum comes.. but when I input character as yes not y... Then it goes into an infinite loop... can anyone explain why?
int a,b;
char ch;
do
{
cout<<"Enter two numbers: ";
cin>>a>>b;
cout<<"The sum is "<<a+b
<<"\nDo you want to try again (y/n): ";
cin>>ch;
}while(ch=='Y'||ch=='y');
0 Votes
2 AnswersCould someone please help me with this..
Write code for an applet class that contains three labels First Number, Second Number, and Sum; three text fields for displaying the values of First Number, Second Number, and Sum, respectively; a button labeled Add. The applet allows the user to enter two integer values and displays the Sum if the Add button is clicked.
Write a html page to run and display the applet appropriately
0 Votes
4 Answerswhat languages are needed to allow customers to upload a form to a server, which can then be displayed on another page (Similar to ebay). i cant wrap my head around what code is needed (other than the method=post)...i have created a database using sql but cant make sense of how to allow a user to enter details...for it to then appear on the home page of my website for example. many thanks!
0 Votes
2 AnswersHot today
Help please?
3 Votes
Ejercicio Pytho
0 Votes
Online voting system
2 Votes
What is that z for
0 Votes
Suggestions needed
4 Votes
Game development
0 Votes
Ruby programming?
3 Votes