Answer:
Yes it is possible for the following cases:-
- When the queue is full.
- When the queue is empty.
Explanation:
When the queue is full the the front and the rear references in the circular array implementation are equal because after inserting an element in the queue we increase the rear pointer.So when inserting the last element the rear pointer will be increased and it will become equal to front pointer.
When the queue is empty the front and rear pointer are equal.We remove an element from queue by deleting the element at front pointer decreasing the front pointer when there is only one element and we are deleting that element front and rear pointer will become equal after deleting that element.
Answer:
Written in C++
#include<iostream>
using namespace std;
int main()
{
const float SALES_TAX = 0.06625;
int total = 1000;
cout<<"Total: ";
cin>>total;
float grand_total = 0;
grand_total = total + total * SALES_TAX;
if (grand_total <= 1000)
{
cout<<"Grand total is less than or equal to 1000 it is $";
printf("%.2f", grand_total);
}
else if (grand_total > 1000 && grand_total <= 2000 )
{
cout<<"Grand total is more than 1000 less than or equal to 2000 it is $";
printf("%.2f", grand_total);
}
else
{
cout<<"Grand total is greater than 2000 it is $";
printf("%.2f", grand_total);
}
cout<<"\nProgram finished!";
return 0;
}
Explanation:
<em>I've added the full source code as an attachment where I use comments to explain difficult lines</em>
It circulated air around the car
Answer:
A and B
Explanation:
parsing with a rich grammar like TAG faces two main obstacles: low parsing speed and a lot of ambiguous syntactical parses.