Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  1. greenieM

    how to read an array of 10 numbers and print the prime numbers?

    this is what i wrote could someone tell me where is my mistake? can i use here flag at all? #include <stdio.h> void main () { int arr[10], i, j, flag; for (i=0;i<10;i++) scanf ("%d", &arr[i]); for (i=0;i<10;i++) { flag=1; for (j=2;j<=(arr[i]/2); j++) { if (arr[i]%j==0) { flag=0; break; }...

Part and Inventory Search

Back
Top