Write Program C Following First Define Array 6 Integer Numbers Called Vec1 Define Array 10 Q37130136

Write a program in C to do the following: First define an arrayof 6 integer numbers called Vec_1.

then define an array of 100 float numbers called Vec_2

Read the values of Vec_1 from the user using a loop.

Set the values of Vec_2 to 0.5, 1, 1.5, 2, 2.5, 3, … 50 using aloop.

(Needs to work in VisualStudio)

Here is what I have so far

#include
#include

int main() {
   int Vec_1[6] = { 0 };
   float Vec_2[100] = { 0 };
   int i;

   printf(“Press the enter key to startn”);
   getchar();
       for (i = 0; i < 6; i++) {
       printf(“Enter a number:”);
      

OR
OR

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.