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

Write a program that finds the minimum total number of shelv, Write a progr...

Write a program that finds the minimum total number of shelves, including the initial one required for this loading process.

Recursion, write a cprogram to calculate fraction through recursion

write a cprogram to calculate fraction through recursion

Big-m method, big-m method operation reseach in progrmme c++..

big-m method operation reseach in progrmme c++..

Describe how can i allocate/unallocate an array of things?, A: Use p = new ...

A: Use p = new T[n] and delete[] p:   Fred* p = new Fred[100]; ... delete[] p; Any time you allocate an array of objects through new (generally with the [n] in the n

Explain friend for overloading operators, Friend for Overloading Operators ...

Friend for Overloading Operators Sometimes friend functions cannot be avoided. For example with the operator overloading. Consider the following class that have data members to

Function that have parameter and makes an integer mask, Write a function th...

Write a function that has an int parameter n, makes an integer mask having the bit 1 at the nth place from the rightmost bit, and returns the mask. For example, when n = 5 is passe

Board coloring, color representation 0,1,2,3,4,5,6,7...

color representation 0,1,2,3,4,5,6,7...

C++ and matlab, ">http://www.ee.nmt.edu/~erives/289_F12/EE289_Takehome_2.p...

">http://www.ee.nmt.edu/~erives/289_F12/EE289_Takehome_2.pdf http://www.ee.nmt.edu/~erives/289_F12/Takehome2_maze.GIF

Recursion, Solve the Nine Queens problem recursively. The objective is to p...

Solve the Nine Queens problem recursively. The objective is to place nine queens on an empty chessboard so that no queen is “attacking” any other, i.e., no two queens are in the sa

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