In Cprogramming Integer & Float Array Values

In Cprogramming Integer & Float Array Values

//Integer & Float Array Values
#include <stdio.h>
int main(){
int i, integerVal[5];
int f, floatVal[5];
printf(“Please enter any integer values:”);
for(i=0;i<5;++i){
scanf(“%d”,&integerVal[i]);
}
for(i=0;i<5;++i){
printf(“Print integer: %d \n”,integerVal[i]);
}
printf(“Please enter any float values:”);
for(f=0;f<5;++f){
scanf(“%f”,&floatVal[f]);
}
for(f=0;f<5;++f){
printf(“Print float: %f \n”,floatVal[f]);
}
return 0;
}

Comments

No comments yet. Why don’t you start the discussion?

Leave a Reply

Your email address will not be published. Required fields are marked *