<u>Explanation:</u>
Hey there! you need not to panic about it ,your program didn't have Driver program i.e main program! the correct & working code is given below:
// C++ program to count even digits in a given number .
#include <iostream>
using namespace std;
// Function to count digits
int countEven(int n)
{
int even_count = 0;
while (n > 0)
{
int rem = n % 10;
if (rem % 2 == 0)
even_count++;
n = n / 10;
}
cout << "Even count : "
<< even_count;
if (even_count % 2 == 0 )
return 1;
else
return 0;
}
// Driver Code
int main()
{
int n;
std::cin >>n;
int t = countEven(n);
return 0;
}
Complete Question:
Recall that with the CSMA/CD protocol, the adapter waits K. 512 bit times after a collision, where K is drawn randomly. a. For first collision, if K=100, how long does the adapter wait until sensing the channel again for a 1 Mbps broadcast channel? For a 10 Mbps broadcast channel?
Answer:
a) 51.2 msec. b) 5.12 msec
Explanation:
If K=100, the time that the adapter must wait until sensing a channel after detecting a first collision, is given by the following expression:
The bit time, is just the inverse of the channel bandwidh, expressed in bits per second, so for the two instances posed by the question, we have:
a) BW = 1 Mbps = 10⁶ bps
⇒ Tw = 100*512*(1/10⁶) bps = 51.2*10⁻³ sec. = 51.2 msec
b) BW = 10 Mbps = 10⁷ bps
⇒ Tw = 100*512*(1/10⁷) bps = 5.12*10⁻³ sec. = 5.12 msec
Answer:
void printArray(int [],int);
Hope this helps!
Answer:
The answer is "Option d"
Explanation:
The wardrobe engineering consists of choosing clothes that are so simple in design and better in the style that they are acceptable to the existing show-up and perfect for the future years. This design Originally coined Dressing for Confidence author John Molloy, which describe that clothes and accessories can also be used to create a certain picture, and wrong choices can be described as follows:
- In option a, It's right, that we know about current fashions, but selecting suitable career apparel is not important, that's why it is incorrect.
- In option b, It is wrong because whatever you wear is not to make choices of any sort.
- In option c, It is wrong because it can't provide promotion.
Answer:
length = float(input("Enter length of the backyard in foot: "))
width = float(input("Enter width of the backyard in foot: "))
sod_price = float(input("Enter the price of sod per square foot: "))
fencing_price = float(input("Enter the price of fencing per foot: "))
area = length * width
perimeter = 2 * (length + width)
cost = sod_price * area + fencing_price * perimeter
print("The cost of landscaping is $" + str(cost))
Explanation:
*The code is in Python.
Ask the user to enter the length, width, sod_price, and fencing_price
Calculate the area and perimeter of the backyard
Calculate the cost, sod_price * area + fencing_price * perimeter
Print the cost