Write a c program to input five numbers, C/C++ Programming

Assignment Help:

Write a C program to input five numbers and print them out on a new line e.g 5, 10, 15, 20, 25 displayed as
  5
  10
  15
  20
  25

#include stdio.h
  void main()
  {  
  char prompt;
  int a,b,c,d,e;
  /* Ask for the integers to be entered */
  printf("Please enter in 5 integers seperated by a space \n\r");
  scanf("%d %d %d %d %d",&a,&b,&c,&d,&e);
  printf("%d \n\r",a);
  printf("%d \n\r",b);
  printf("%d \n\r",c);
  printf("%d \n\r",d);
  printf("%d \n\r",e);  
  printf("Press any key to exit \n\r");
  scanf("\n%c",&prompt);  
  }


Related Discussions:- Write a c program to input five numbers

Assign random integers to the variable, (Random Numbers) Write statements t...

(Random Numbers) Write statements that assign random integers to the variable n in the following ranges: a) 1 ≤ n ≤2 b) 1 ≤ n ≤100 c) 0 ≤ n ≤9 d) 1000 ≤ n ≤1112 e)

Define external storage class - computer programming, Define External Stora...

Define External Storage Class - computer programming? When a variable is declared outside a function the storage is permanently assigned to it and its storage class is 'extern'

I need poker room auto seat program, Project Description: I want a scrip...

Project Description: I want a script for an online poker site. It needs to be scanning all the required tables and when the table meets certain criteria it should take a seat at

Described multiple inheritance(virtual inheritance)?, Described multiple in...

Described multiple inheritance(virtual inheritance)? And explain its advantages and disadvantages? A: It is the procedure in which a child can be derived from more than one pare

Explain bit-wise operators, Bit-wise Operators Some applications requir...

Bit-wise Operators Some applications require operations to be done on dissimilar bits of a byte separately. Bit-wise operators offer a facility to do just that. There are vario

.program, Write a c++ program to find the sum of 0.123 ??103 and 0.456 ??10...

Write a c++ program to find the sum of 0.123 ??103 and 0.456 ??102 and write the result in three significant digits

Explain static variables, Static Variables Static variables have the si...

Static Variables Static variables have the similar scope s automatic variables, but, unlike automatic variables, static variables retain their values over number of function ca

Explain the terms- substitutability and extensibility, Explain the terms- S...

Explain the terms- Substitutability and Extensibility Substitutability - The objects of a properly derived class can be safely and easily substituted for an object of its

What is threaded binary tree, Threaded binary tree: Consider the linked il...

Threaded binary tree: Consider the linked illustration of a binary tree 'T.  Approximately half of the entries is the pointer fields 'LEFT' and 'RIGHT' will have null elements. Th

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd