1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
svetoff [14.1K]
3 years ago
14

Type a C statement that declares and initializes variable taxRate to the value 0.085. Make sure to include a prefix 0 before typ

ing the .085
Engineering
1 answer:
Blizzard [7]3 years ago
7 0

Answer:

float taxRate = 0.085f

Explanation:

Variable initialisation in C (or any other programming language) is a way of declaring variable and assigning some values to the variable declared.

To initialise a variable in C, the data type, variable name and value are needed.

The following syntax must be obeyed when initialising a variable:

Data-type variable-name = value

Data-type represents which type of value is going to be stored in the variable.

Variable name, also known as identifier represents valid variable name (name of the allocated memory blocks for the variable).

Value represents the value or content of the declared variable.

You might be interested in
A converging-diverging nozzle has an area ratio of 5.9. (1) Determine the (P0/Pt) values corresponding to the 1st, 2nd, and 3rd
nata0808 [166]

Answer:

Check the explanation

Explanation:

The Total pressure is the overall of fixed or static pressure p, the dynamic pressure q, as well as gravitational head. Total pressure can also be referred to as the measure of the overall energy of the airstream, and is the same to static pressure plus velocity pressure.

kindly check the step by step solution in the attached image below to Determine the (P0/Pt) values corresponding to the 1st, 2nd, and 3rd critical points.

5 0
3 years ago
Cho P1= XdaN, P2=3.X daN, P= 2.X (daN). a=1m, b=2m,MCN hình tròn d= (100+X)mm1/ Tính nội lực tại các mặt cắt cách ngàm 0,5m; 1m;
DaniilM [7]

Answer:

Please explain it in English so that i can help or you need someone else who can speak Vietnam

5 0
2 years ago
For this problem, you may not look at any other code or pseudo-code (even if it is on the internet), other than what is on our w
sergiy2304 [10]

Answer:

(a)

(i) pseudo code :-

current = i

// assuming parent of root is -1

while A[parent] < A[current] && parent != -1 do,

if A[parent] < A[current] // if current element is bigger than parent then shift it up

swap(A[current],A[parent])

current = parent

(ii) In heap we create a complete binary tree which has height of log(n). In shift up we will take maximum steps equal to the height of tree so number of comparison will be in term of O(log(n))

(b)

(i) There are two cases while comparing with grandparent. If grandparent is less than current node then surely parent node also will be less than current node so swap current node with parent and then swap parent node with grandparent.

If above condition is not true then we will check for parent node and if it is less than current node then swap these.

pseudo code :-

current = i

// assuming parent of root is -1

parent is parent node of current node

while A[parent] < A[current] && parent != -1 do,

if A[grandparent] < A[current] // if current element is bigger than parent then shift it up

swap(A[current],A[parent])

swap(A[grandparent],A[parent])

current = grandparent

else if A[parent] < A[current]

swap(A[parent],A[current])

current = parent

(ii) Here we are skipping the one level so max we can make our comparison half from last approach, that would be (height/2)

so order would be log(n)/2

(iii) C++ code :-

#include<bits/stdc++.h>

using namespace std;

// function to return index of parent node

int parent(int i)

{

if(i == 0)

return -1;

return (i-1)/2;

}

// function to return index of grandparent node

int grandparent(int i)

{

int p = parent(i);

if(p == -1)

return -1;

else

return parent(p);

}

void shift_up(int A[], int n, int ind)

{

int curr = ind-1; // because array is 0-indexed

while(parent(curr) != -1 && A[parent(curr)] < A[curr])

{

int g = grandparent(curr);

int p = parent(curr);

if(g != -1 && A[g] < A[curr])

{

swap(A[curr],A[p]);

swap(A[p],A[g]);

curr = g;

}

else if(A[p] < A[curr])

{

swap(A[p],A[curr]);

curr = p;

}

}

}

int main()

{

int n;

cout<<"enter the number of elements :-\n";

cin>>n;

int A[n];

cout<<"enter the elements of array :-\n";

for(int i=0;i<n;i++)

cin>>A[i];

int ind;

cout<<"enter the index value :- \n";

cin>>ind;

shift_up(A,n,ind);

cout<<"array after shift up :-\n";

for(int i=0;i<n;i++)

cout<<A[i]<<" ";

cout<<endl;

}

Explanation:

8 0
3 years ago
A factory hires a consultant to recommend ways to improve its productivity. The consultant notices that the production floor is
Romashka [77]

Answer:

B

Explanation:

Keep only what is used. Remove all unnecessary items. Red tag these items for review.

8 0
2 years ago
Disk A has a mass of 8 kg and an initial angular velocity of 360 rpm clockwise; disk B has a mass of 3.5 kg and is initially at
garri49 [273]

Answer:

A. αa= 9.375 rad/s^2, αb= 28.57 rad/s^2

B. ωa=251rpm, ωb=333rpm

Explanation:

Mass of disk A, m1= 8kg

Mass of disk B, m2= 3.5kg

The initial angular velocity of disk A= 360rpm

The horizontal force applied = 20N

The coefficient of friction μk = 0.15

While slipping occurs, a frictional force is applied to disk A and disk B

T= 1/2Mar^2a

T=1/2 (8kg) (0.08)^2

T= 0.0256kg-m^2

N=P=20N

F= μN

F= 0.15 × 20

F=3N

We have

Summation Ma= Summation(Ma) eff

Fra= Iaαa

(3N)(0.08m)= (0.0256kg-m^2)α

αa= 9.375 rad/s^2

The angular acceleration at disk A is αa= 9.375 rad/s^2 is acting in the anti-clockwise direction.

For Disk B,

T= 1/2Mar^2a

T= 1/2(3.5) (0.06)^2

=0.0063kg-m^2

We have,

Summation Mb= Summation(Mb) eff

Frb= Ibαb

(3N)(0.06m)= (0.0063kg-m^2) α

αb= 28.57 rad/s^2

B) ( ωa)o= 360rpm(2 pi/60)

= 1 pi rad/s

The disk will stop sliding where

ωara=ωbrb

(ωao-at)ra=αtr

(12pi-9.375t) (0.08)=28.57t(0.06)

(37.704-9.375t)(0.08)= 1.7142t

3.01632-0.75t= 1.7142t

t=1.22s

Now,

ωa=(ωa)o- t

12pi - 9.375(1.22)

37.704-11.4375

=26.267 rad/s

26.267× (60/2pi)

= 250.80

251rpm

The angular velocity at a, ω= 251rpm

Now,

ωb= αbt

=28.57(1.22)

=34.856rad/s

34.856rad/s × (60/2pi)

=332.807

= 333rpm

Therefore the angular velocity at b ω=333rpm

4 0
3 years ago
Read 2 more answers
Other questions:
  • 5. Which of these least accurately describes what happens when abnormal combustion raises the temperature and pressure inside th
    8·1 answer
  • Select the properties and typical applications for the high carbon steels.
    12·1 answer
  • A mass of 5 kg of saturated water vapor at 100 kPa is heated at constant pressure until the temperature reaches 200°C.
    6·1 answer
  • If you are in a tornado situation, which of the following actions would put you in danger?
    11·1 answer
  • The ???? − i relationship for an electromagnetic system is given by ???? = 1.2i1/2 g where g is the air-gap length. For current
    6·1 answer
  • Write a program that uses while loops to perform the following steps: Step a: Prompt the user to input two integers: firstNum an
    12·1 answer
  • Various factors to be considered in deciding the factor of safety?
    14·1 answer
  • Think about the science you have studied in the past or are currently studying. Give an example of something you have learned in
    11·1 answer
  • Give me an A please!!!¡!!!!¡
    5·1 answer
  • The quantity of bricks required increases with the surface area of the wall, but the thickness of a masonry wall does not affect
    10·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!