bubbaforbes2005
21.08.2019 •
Computers and Technology
Use a karnaugh map to find a minimum sum of products for the following function. show the k-map, write the minimal boolean expression, and draw the logic diagram
f= a'b'cd + a'b'cd' + bd + ab'cd
Solved
Show answers
More tips
- H Health and Medicine How to Treat the Flu: A Comprehensive Guide...
- O Other What is a Disk Emulsifier and How Does it Work?...
- H Health and Medicine How to Calm Your Nerves? Expert Tips That Actually Work...
- A Animals and plants 5 Tips for Taking Care of Yews to Keep Them Green and Beautiful...
- S Sport How to wrap boxing hand wraps? Everything you need to know!...
- F Food and Cooking 10 Reasons Why You Should Avoid Giving Re-Gifts: An Informative Guide...
- F Family and Home Tender Care for Your Parquet: Is it Possible to Clean Parquet?...
- S Style and Beauty How Are Eyelash Extensions Applied? All Your Questions Answered...
- F Food and Cooking 10 Tips for Proper Sushi Consumption...
- S Style and Beauty Learn how to tie a keffiyeh on your head like a pro...
Answers on questions: Computers and Technology
- C Computers and Technology A desktop computeris the case that houses the main components is the case that houses the main components of the computer and where peripheral devices connect....
- C Chemistry The Florissant Fossil Beds in Colorado are home to several massive redwood stumps that were subjected to a special kind of fossilization millions of years ago What service could these...
- C Chemistry How are air resistance and friction similar? A. They are both noncontact forces. B. They are both types of nuclear forces. C. They both slow things down. D. They both work using gravity....
Ответ:
#include <stdio.h>
int main()
{
int A[10];
int sum = 0;
printf("Enter array elements\n");
for (int i = 0; i < 10 ; i++)
scanf("%d", &A[i]);
for (int i = 0; i < 10 ; i++) {
if (i % 2 ==1)
sum += A[i];
}
printf("Sum of odd indexed elements: %d \n", sum);
printf("Array in reverse order: ");
for (int i = 9; i >= 0; i--)
printf("%d ", A[i]);
return 0;
}
Explanation:
Declare the array and sum variable
Ask user for the array elements and put them in the array using for loop
Calculate the sum of the numbers that are at odd index, check if the index is odd using modulo operator
Print the array in reverse order using for loop, start the index from 9 and go until 0, so that it will print from back