techAtma
Saturday, August 18, 2018
ARRAY:PROGRAM TO INPUT ARRAY AND STORE THE SQUARE ELEMENTS
#include<stdio.h>
void main()
{
int arr[5],i;
printf("Enter the array elements:");
for(i=0;i<5;i++)
{
scanf("%d",&arr[i]);
arr[i]=arr[i]*arr[i];
}
printf("The square elements of the array are:");
for(i=0;i<5;i++)
{
printf("%d,",arr[i]);
}
}
OUTPUT:
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
Static Member Function
CODE : #include<iostream> using namespace std; class test { int code; static int count; //static...
No comments:
Post a Comment