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

Assignment Help:

 Write a C program to input three real numbers and  print them out as follows :

The first variable is ....... and the second one is ......

The last variable is ..........

The variable format specification is

Variable 1 10 spaces of 5 decimal

Variable 2   none

Variable 3  signed  10 spaces 5 decimal
   
  #include stdio.h
  main()
  {
  char prompt;

  float a,b,c;

  printf("Please enter in three real numbers \n\r");

  scanf("%f %f %f",&a,&b,&c);

printf("The first variable is%11.5f  and the second one is %f \n\r",a,b);

printf("The last variable is %+12.5f \n\r",c);

printf("Press any key to exit \n\r");

scanf("\n%c",&prompt); 
  }


Related Discussions:- Write a c program to input three real numbers

Addition of array elements, Addition of array elements: #define rows 3 ...

Addition of array elements: #define rows 3 #define cols 3 void main() {                 int i=0,j=0,sum=0;                 int arr[rows][cols];

Explain the loop statements in computer programming, Explain the Loop State...

Explain the Loop Statements in Computer Programming? 1. C gives you a choice of three kinds of loop, while, do while and for. 2. The while loop remain repeating an action until

#superASC2 SRTING COST, A string S is said to be "Super ASCII", if it conta...

A string S is said to be "Super ASCII", if it contains the character frequency equal to their ascii values. String will contain only lower case alphabets (''a''-''z'') and the asci

Example for register storage class - computer programming, Example for Regi...

Example for Register Storage Class - computer programming? main() { register int i; for (i=0; i { ............... ............... } } /* block exit will free the register

Define constructors-extract and insert operators, For your class to work pr...

For your class to work properly, you'll need to define appropriate constructors, extract and insert operators, and of course arithmetic operators. (If you wanted to use it as a gen

Computer Science Engineering C++ Homework, Temperature Conversions. Problem...

Temperature Conversions. Problems 28 through30generate temperature-conversion tables. Use the following equations that give relationships between temperatures in degrees Fahrenheit

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