Reads ten integers and prints the first and the last on one line

clarence_cool03 0 Tallied Votes 135 Views Share

{-='Reads ten integers and prints the first and the last on one line using Dev-C LaNGuaGe'=-}

#include <stdio.h>

int main (void)
{
//  Local Declarations
    int num1, num2, num3, num4, num5, num6, num7, num8, num9, num10;
    
//  Statements
    printf("Enter your 10 numbers:\n");
    scanf("%d %d %d %d %d %d %d %d %d %d", &num1, &num2, &num3, &num4, &num5, &num6, &num7, &num8, &num9, &num10);
    
//  This will show your numbers in arranged form
    printf("Here are your numbers in arranged form:\n");
    
    printf("%d %d\n", num1, num10);
    printf("%d %d\n", num2, num9);
    printf("%d %d\n", num3, num8);
    printf("%d %d\n", num4, num7);
    printf("%d %d\n", num5, num6);
 
    system("pause");
    return 0;
}// main
ravishkkumar 0 Newbie Poster

who Mr. X has uploaded it ..
please tell me the significance of this code ......
what a great thing in this code....?????????????
i will reply again after your(Mr. X) comment !!!!!!!!!!!!:)

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.