Introduction

The main purpose of this blog is to share our experience with the world and get experience from the world. This will be a new venture for us and we are sure, we shall learn a lot with it. we will try to Explore our mind which will be very helpful for all us. As from its name, its a blog covering all the topics. we will try to post all the interesting topics and give our opinion. Do give your point of view in comments.


"NAVIGATE VIA BLOG ARCHIVE ON RIGHT TO GET WHAT YOU ARE LOOKING FOR"


Wednesday, January 26, 2011

C CODE TO RECEIVE MULTIPLE INPUTS

The following code represents basic way to receive multiple inputs from user.It depends on the number of variables initialized. At this stage more variables initialized more inputs  can be take from user.

#include <stdio.h>

int main () {

int a,b,c,d,e;

printf("PLEASE ENTER 5 NUMBERS\n");

scanf("%d %d %d %d %d",&a,&b,&c,&d,&e);

printf("YOU HAVE ENTERED FOLLOWING NUMBERS:\n");

printf("First=%d \nSecond=%d \nThird=%d \nFourth=%d \nFifth=%d\n ",a,b,c,d,e);

return 0;
}

No comments:

Post a Comment

Related Posts with Thumbnails