Best writers. Best papers. Let professionals take care of your academic papers

Order a similar paper and get 15% discount on your first order with us
Use the following coupon "FIRST15"
ORDER NOW

I do not know what i did to make this run wrong. It is supposed to find the smallest number.

I do not know what i did to make this run wrong. It is supposed to find the smallest number. c programing

#include<stdio.h>

int main() {

int a[10], i, num, smallest;

printf(“\nEnter no of elements :”);

scanf(“%d”, &num);

//Read n elements in an array

for (i = 0; i < num;)

scanf(“%f”, a[i]);

//Consider first element as smallest

smallest = a[0];

for (i = 0; i < num;) {

if (a[i] < smallest) {

smallest = a[i];

}

}

// Print out the Result

printf(“\nSmallest Element : %d”, smallst);

return (0);

 
Looking for a Similar Assignment? Order now and Get 10% Discount! Use Coupon Code "Newclient"