Latest Tutorials| Questions and Answers|Ask Questions?|Site Map




Have Programming Question? Ask it here!
 
 
 


mickey singhal
c programme
0 Answer(s)      8 months ago
Posted in : IDE Questions


When we drop a ball on a rigid surface it bounces from the surface upto a height which can be expressed as some percentage of its previous height. This percentage is based on something known as coefficient of restitution. This coefficient is different for different types of balls. For example if the coefficient is 0.9 it means that the ball will go up to 90 percent of its previous height after each bounce.√?¬†√?¬†So if a ball with√?¬†√?¬†coefficient=0.9 is dropped initially from a√?¬†√?¬†height of 10 meters, after 1 bounce the height will be 9 meters, after 2 bounces it will be 8.1 meters and so on.√?¬†√?¬†The total distance the ball has traveled after one bounce is 10 + 9 = 19 meters, after two bounces the total distance is 10 + 9 + 9 + 8.1 = 36.1

√?¬†

Write a program in C that where the user will input an initial height(in metres) and also the coefficient of restitution r (the value of r will be between 0 and 1). Declare an array HEIGHT[101] for storing the height of the ball after each bounce. HEIGHT[0] will contain the original height from which the ball is dropped. HEIGHT[1] to HEIGHT[100] will contain the height after each of the bounces. Your program should display the original height and then followed by the number of each bounce and the height of that bounce. You should stop either when the height of the ball is less than 1 cm (=0.01 meter) or until 100 bounces are completed. Your program should also compute and display the total distance the ball has traveled till the end.


Advertisement
View Answers

Related Tutorials/Questions & Answers:
c programme
c programme  When we drop a ball on a rigid surface it bounces from the surface upto a height which can be expressed as some percentage of its... a program in C that where the user will input an initial height(in metres) and also
hotel management programme in c language?
hotel management programme in c language?  hotel management programme in c language
Advertisements
programme
programme  Using an ATM, customer can access their bank accounts in order to credit/debit cash and check their account balances.You have to write c programme to implement a simple ATM for 15 customers. Initially you have to store
java programme
java programme   1.....programme for reading 10 values for 10 variables using scanner class 2....declares all types of primitive data inside main method
java programme
java programme   i have to write a java programe that calculates the average of 10 students in Test 1 ,Test 2 and Test 3....Values of the marks in all the test for a student should be hardcore.Ialso have to tell the maixmum
c++
c++  write a programme that calculates the area and circumference of a rectangle
menu driven programme
menu driven programme   calculate the area of circle, square, rectangle in menu driven programme in java
C++
C++  I have been asked to write a programme that gets five values,gets the sum,average and product please help me
compiling programme IJVM
compiling programme IJVM  I TRY AND COMPILE THE PROGRAMME BELOW...' OUT BIPUSH 110 'n' OUT BIPUSH 99 'c' OUT BIPUSH 101 'e' OUT... BIPUSH 99 'c' OUT BIPUSH 116 't' OUT BIPUSH 61 '=' OUT BIPUSH 0 OUT OUT
programme - Java Beginners
programme  java programme to implement stack operation?use stack to check whether a given string is polidrome or not  Hi Friend, Please visit the following link to get the stack implementation: http
please solve the programme
of a quadratic equation ax2+bx+c=0, with the following specification :- Class name :- Quad Data members float a,b,c,d, with a,b,c are the co-efficient... Member methods ? Quad (int x, int y, int z) to initialize a=x, b=y, c=z & d=0
JAVA programme - JDBC
: a. Use of ?char At? function. b. Use of ?concat? function. c. Use of ?length
c++
c++  write a programme that calculates the area and circumference of a rectangle   #include<conio.h> #include<iostream.h> class rect { int l,b; int area; int peri; public: void get_rect() { cout<<"\n
JAVA programme - Java Interview Questions
JAVA programme  Perpare a class "package_example" following the basic functionality of "string" type in JAVA.Use of dynamic character arrays for such class is encouraged.Following is expected from the programme: a.Use of 3
c#
c#  how to find out the size of the BMP image in C
C++
C++  How can i write this in dev c
C++
C++  How can i write this in dev c
c++
c++  use a prgrm as an example to xplain-: a)class b)object c)message d)cope resolution operator
c#
c#  how to find out the size of the BMP image
C++
C++  dear sir How to create windows form application for login screen using C++? USER Name -TESTADMIN Password -testuser
c++
c++  i use turbo c++...i want to change the background color...what is the command for it and the header file used
c++
c++  i use turbo c++...i want to change the background color...what is the command for it and the header file used
c++
c++  i use turbo c++...i want to change the background color...what is the command for it and the header file used
C++
C++  differenciate btw.-a)local & public variables b)pre-defined & user defined functions c)fnctn prototype,defination & fnctn code.use code examples
c++
c++  differenciate btw.-a)local & public variables b)pre-defined & user defined functions c)fnctn prototype,defination & fnctn code.use code examples
c++
c++  differenciate btw.-a)local & public variables b)pre-defined & user defined functions c)fnctn prototype,defination & fnctn code.use code examples
C++
C++  Trace the bubble sort using the following integers,which represent the elements in an array. 5,7,3,8,6,7,3
c++
c++  write a prgrm tht accepts 3 integer values,then with a function to swap the values
C++
C++  Describe the principle advantages of deploying a linked list versus a static array when implementing a Queue or a Stack
C#
C#  i need a code that will make program perform the basic operations upon the data Listview save, update and cancel
C#
C# register form  i want to generate a user id automatically after filling their register form and i want to show their id to their email? please reply me soon
c++
c++  Consider the following function: int funcExercise7(int list[], int size) { int sum = 0; for (int index = 0; index < size; index++) sum = sum + list[index]; return sum
c++
c++  Consider the following declarations: class xClass { public: void... private members does class xClass have? c. How many constructors does class xClass.... Write a C++ statement that prints the values of the data members of the object
c++
c++  .write a program that accepts 5 subjects of a student,it should have a function to calculate the average & another function to grade.grade should be as follows-<40=E,40-49=D,50-59=C,60-69=B & >70
C++
C++  write a prgrm tht gets five values,gets the sum,average &...; #include <conio.h> void main() { clrscr(); int a,b,c,d,e,sum; float average...;>b>>c>>d>>e; sum=a+b+c+d+e; average=sum/5; product=a*b*c*d
c++
c++  write a prgrm tht calculates the surface area of a cylinder.the prgrm shld find the circumfrance and have a function that calculates the fadius and another to calculate the surface area
c++
c++  write a program that gets a key or character from the keyboard and displays it ASII code in decimal, hexadecimal and binary form.It must also give a description of the key pressed
c++
c++  Consider the following declarations: class xClass { public: void func(); void print() const; xClass (); xClass (int, double); private: int u... private members does class xClass have? c. How many constructors does class xClass
c++
c++  Write a console based C++ program that reads student information from a text file, build an array of objects of type class StudentInfo... name with the minimum GPA 7) Display Student GPAs as Letter Grades (A, B, C, D
c++
c++  Characterize the following algorithm in terms of Big-O notation. Also find the exact number of additions executed by the loop. (Assume that all variables are properly declared.) for (int i = 1; i <= n; i++) sum = sum + i
c++
c++  Characterize the following algorithm in terms of Big-O notation. for (int i = 1; i <= n; i++) for (int j = 1; j <= n; j++) for (int k = 1; k <= n; k++) cout << i + j + k
C++
C++  . Consider the definition of the following class: class CC { public: CC(); //Line 1 CC(int); //Line 2 CC(int, int); //Line 3 CC(double, int); //Line 4 . . . private: int u; double v
c++
c++  .write a prgrm tht accepts 5 subjects of a student,it shld hv a function to calculate the average & another function to grade.grade shld be as follows-<40=E,40-49=D,50-59=C,60-69=B & >70
c++
c++  Write the definition of the class dayType that implements the day of the week in a program. The class dayType should store the day... on an object of type dayType: a. Set the day. b. Print the day. c. Return the day
c++
c++   Assume vector "x" of integers with values of 7, 3, 5, 8, 1, 9, 0, 4, 2, 6. Second, assume integer variables "a," "b" and "y" with values of 3, x.size()-5 and 0, respectively. Third, assume a for-loop header which: 3.1
C,C++
C,C++  Sir, 100&30 gives output 4 in C++ and 100|30 gives output 116 How & and | gives output 4 and 116
C,C++
C,C++  int i=100,j=20; int c=i&j; int r=i|j; printf("%d",c); printf("%d",r);   #include<stdio.h> #include<conio.h> void main(){ int i=100,j=20; int c=i&j; int r=i|j; printf("%d",c); printf("%d",r
How to add a file in GZIP file format in Java programme.
How to add a file in GZIP file format in Java programme.  Hi please help me. How to add a file GZIP File format in Java program. If example or suggest link for reference then it will be good. thanks,   Hi
 

 

 

DMCA.com