Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

//For this lab, you are to make a function that takes in an integer as an argume

ID: 3883847 • Letter: #

Question

//For this lab, you are to make a function that takes in an integer as an argument, and prints out that number, that number of times.
//For example if you were to call the function with the number 3, the output would be 333 - if you called it with 5, then it would be 55555.

//For this Lab, you are to make a function thot takes in an integer as an argumen er /For example if you were to calL the function with #include void printN(int x); int mainO int numl; puts("Please enter a number:) scanf("%d", &num1;); printN(num1); return 0; void printN(int x)

Explanation / Answer

ans) the program is to be

#include<stdio.h>

#include<conio.h>

void printN(int x);

       int main()

        {

            clrscr();

            int num1;

            puts("please enter number:");

            scanf("%d",&num1);

            printN(num1);

            return 0;

         }

   void printN(int x)

     {

         for(int r=x;r>=x;r--)

           {

               puts("required output is to be:");

               for(int c=1;c<=r;c++)

                 {

                        printf("%d",r);

                   }

            }

    }