Friday, 22 March 2019

CP: Array Display

Que: 
Write a program for
a) Write a program to accept 5 numbers in an array and display it.


Code:

#include <stdio.h>

void  main()

{
    int arr[5];
    int i;

    printf("\nEnter elements one by one :\n");

    for(i=0; i<5; i++)
    {
        scanf("%d", &arr[i]);
    }


}

Output:


No comments:

Post a Comment

LAB 7 Arduino with Seven Segment Display || Arduino Tutorial || Code and Circuit Diagram || Project

  LAB 7 Arduino with Seven Segment Display || Arduino Tutorial || Code and Circuit Diagram || Project Dear All We will learn how to Connec...