/* Problem: This program initializes an array with all cells filled with 0.0 */ #include <stdio.h> int main (void) { double x[100]; int i; /* initializing the array with 0.0 */ for (i=0; i<100; ++i) x[i] = 0.0; /* printing the array for verification */ for (i=0; i<100; ++i) printf ("%5.1lf", x[i]); return (0); }
#include
উত্তরমুছুনint main ()
{
int a[ 10 ];
int i,j;
for ( i = 0; i < 10; i++ )
{
a[ i ]= i;
}
for (j = 0; j < 10; j++ )
{
printf("%d\n", j, a[j] );
}
return 0;
}
#include
উত্তরমুছুনint main (void)
{
double x[100];
int j;
for (j=0; j<100; ++j)
x[j] = 0.0;
for (j=0; j<100; ++j)
printf ("%6.11f", x[j]);
return (0);
}
#include
উত্তরমুছুনusing namespace std;
int main ()
{
int i,j,array[5];
for(i=0;i<=4;i++)
{
array[i]=i;
}
for(j=0;j<=4;j++)
{
cout<<array[j]<<endl;
}
}
উত্তরমুছুন#include
int main(){
int a[3],i,j;
for(i=0;i<=3;i++)
{
a[i]=i;
}
for(j=0;j<=3;j++)
{
printf("%d\n",a[j]);
}
}