Go Back   nV News Forums > Software Forums > Software Development

Newegg Daily Deals

Closed Thread
 
Thread Tools
Old 07-22-11, 07:45 AM   #13
Addison_16
Registered User
 
Join Date: Jul 2011
Posts: 1
Default Re: C programming

#include <stdio.h>
int main()
{
int a[ MAX ] = { 0 };
int i, j,k = 0;
int duplicate;
int value;
printf( "Enter 20 numbers between 10 - 100;\n" );
for ( i = 0; i <= MAX - 1; i++ ){
duplicate = 0;
scanf( "%d", &value);
for ( j = 0; j < k; j++ ) {
if ( value == a[ j ] ) {
duplicate = 1;
break;
{



/* enter number into array if it's not a duplicate */
if ( !duplicate )

a[ k++ ] = value;

} /* end if */
__________________
Cegonsoft
Addison_16 is offline  
Closed Thread


Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


Similar Threads
Thread Thread Starter Forum Replies Last Post
Video: New Accelerations for Parallel Programming News Latest Tech And Game Headlines 0 06-25-12 07:20 AM
Google Blockly: New Visual Programming Language News Latest Tech And Game Headlines 0 06-13-12 06:00 AM
Video: Programming Heterogeneous Many-cores Using Directives News Latest Tech And Game Headlines 0 05-23-12 08:00 AM
nCore Schedules Popular Multicore Programming Course for Houston News Latest Tech And Game Headlines 0 05-14-12 05:00 PM
Slidecast: Scalable HPC ' New Accelerations for Parallel Programming Languages over News Latest Tech And Game Headlines 0 05-08-12 07:10 AM

All times are GMT -5. The time now is 01:36 AM.


Powered by vBulletin® Version 3.7.1
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Copyright 1998 - 2014, nV News.