Question

I need the programming to be in language C. I am using a program called Zybook...

I need the programming to be in language C. I am using a program called Zybook

Prompt:

Write a statement that outputs variable numObjects. End with a newline.

Given:

#include <stdio.h>

int main(void) {
int numObjects;

scanf("%d", &numObjects);

return 0;
}

What I did so far. I am not sure if its right tho?

#include <stdio.h>

int main(void) {
int
numObjects;

scanf("%d", &
numObjects);

printf(" num Objects is ");
printf("%d\n", userAge);

return 0;
}

0 0
Add a comment Improve this question Transcribed image text
Answer #1
#include <stdio.h>

int main(void) {
    int numObjects;
    
    scanf("%d", &numObjects);
    printf("%d\n",numObjects);
    return 0;
}
Add a comment
Know the answer?
Add Answer to:
I need the programming to be in language C. I am using a program called Zybook...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • In C programming language: This program will output a right triangle based on user specified height...

    In C programming language: This program will output a right triangle based on user specified height triangleHeight and symbol triangleChar. (1) The given program outputs a fixed-height triangle using a * character. Modify the given program to output a right triangle that instead uses the user-specified triangleChar character. (1 pt) (2) Modify the program to use a nested loop to output a right triangle of height triangleHeight. The first line will have one user-specified character, such as % or *....

  • Using C, I need help debugging this program. I have a few error messages that I'm...

    Using C, I need help debugging this program. I have a few error messages that I'm not sure how to fix. Here is the code I have: /* * C Program to Print a Linked List in Reverse Order */ #include <stdio.h> #include <stdlib.h> struct node { int num; struct node *next; }; int main() { struct node *p = NULL; struct node_occur *head = NULL; int n; printf("Enter data into the list\n"); create(&p); printf("Displaying the nodes in the list:\n");...

  • Translate the following C program to Pep/9 assembly language. #include <stdio.h> int main() {     int...

    Translate the following C program to Pep/9 assembly language. #include <stdio.h> int main() {     int number;     scanf("%d", &number);     if (number % 2 == 0) {         printf("Even\n");     }     else {         printf("Odd\n");     }     return 0; }

  • I am writing a program that reads ten integers from standard input, and determines if they...

    I am writing a program that reads ten integers from standard input, and determines if they are going up or down or neither. Can I get some help? I have supplied what I have already. #include <stdio.h> #include <string.h> #include <stdlib.h> int isGoingUp(int [a]); int isGoingDown(int [b]); int main(void) { int array[10]; printf("Enter ten integers : "); for (int a = 0; a < 10; a++) scanf("%d", &array[a]); if (isGoingUp(array) == 1) printf("The values are going up\n"); else if (isGoingDown(array)...

  • Convert C++ language to PEP/8 assembly language

    Convert this C++ language to PEP/8 assembly language. #include <stdio.h> int main(void) {        int num, rem;     printf("Enter a number: ");     scanf("%d", &num);     printf("Roman numerals: ");             while(num != 0)     {         if (num >= 1000)       // 1000 - m         {            printf("m");            num -= 1000;         }         else if (num >= 900)   // 900 -  cm         {            printf("cm");            num -= 900;         }                 else if (num >= 500)   // 500 - d         {                       printf("d");            num -= 500;         }         else if (num >= 400)   // 400 -  cd         {            printf("cd");            num -= 400;         }         else if (num >= 100)   // 100 - c         {            printf("c");            num -= 100;                                }         else if (num >= 90)    // 90 - xc         {            printf("xc");            num -= 90;                                                       }         else if (num >= 50)    // 50 - l         {            printf("l");            num -= 50;                                                                              }         else if (num >= 40)    // 40 - xl         {            printf("xl");                       num -= 40;         }         else if (num >= 10)    // 10 - x         {            printf("x");            num -= 10;                    }         else if (num >= 9)     // 9 - ix         {            printf("ix");            num -= 9;                                  }         else if (num >= 5)     // 5 - v         {            printf("v");            num -= 5;                                              }         else if (num >= 4)     // 4 - iv         {            printf("iv");            num -= 4;                                                                     }         else if (num >= 1)     // 1 - i         {            printf("i");            num -= 1;                                                                                            }     }     return 0;}

  • Write a C Program that inputs an array of integers from the user along-with the length...

    Write a C Program that inputs an array of integers from the user along-with the length of array. The program then prints out the array of integers in reverse. (You do not need to change (re-assign) the elements in the array, only print the array in reverse.) The program uses a function call with array passed as call by reference. Part of the Program has been given here. You need to complete the Program by writing the function. #include<stdio.h> void...

  • Translate the following C program to Pep/9 assembly language. #include <stdio.h> const int limit = 5;...

    Translate the following C program to Pep/9 assembly language. #include <stdio.h> const int limit = 5; int main() { int number; scanf("%d",&number); while (number < limit){ number++; printf("%d",number); } return 0; }

  • Translate the High order language program to assembly language and generate PEP9 assembly language code. #include...

    Translate the High order language program to assembly language and generate PEP9 assembly language code. #include <stdio.h> int main() { int number; scanf(“%d”,&number ); if (number <0) { number =- number; } printf ("%d", number); return0; }

  • C program. Using do-while loop for this question. Question: write a program to calculate the average...

    C program. Using do-while loop for this question. Question: write a program to calculate the average of first n numbers. output: Enter the value of n : 18 The sum of first 18 numbers =171 The average of first 18 numbers = 9.00 my code couldn't give me the right avg and sum. Please help. #include<stdio.h> int main() {     int num;     int count =0;     int sum=0;     float avg;      printf("Enter the value of n: ");    ...

  • C Programming - RSA encryption Hi there, I'm struggling with writing a C program to encrypt and decrypt a string usi...

    C Programming - RSA encryption Hi there, I'm struggling with writing a C program to encrypt and decrypt a string using the RSA algorithm (C90 language only). It can contain ONLY the following libraries: stdio, stdlib, math and string. I want to use the following function prototypes to try and implement things: /*Check whether a given number is prime or not*/ int checkPrime(int n) /*to find gcd*/ int gcd(int a, int h) void Encrypt(); void Decrypt(); int getPublicKeys(); int getPrivateKeys();...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT