Friday, April 24, 2026

Program to read and display array elements

#include<stdio.h>
void main()
{
    int a[50]; int n,i;

    do
    {
        printf("\nEnter no. of elements in between 1 and 50: ");
        scanf("%d",&n);
    }while(n<1 || n>50);

    printf("\nEnter the elements");
    for(i=0;i<n;i++)
        scanf("%d",&a[i]);

    printf("\nElements are ");
    for(i=0;i<n;i++)
        printf("%d ",a[i]);

    getch();
}

1 comment:

  1. Kaplan coursework can involve detailed instructions, research, and specific assessment requirements. Students who are unsure about expectations may benefit from reviewing kaplan assignment answers as learning references. Comparing examples with assessment criteria can help clarify structure, improve understanding, and identify common mistakes. The most useful approach is to study the reasoning behind an answer rather than simply copying it, helping you develop stronger academic and subject-specific skills.

    ReplyDelete

Program to read and display array elements

#include<stdio.h> void main() {     int a[50]; int n,i;     do     {         printf("\nEnter no. of elements in between 1 and 50:...