Pages

Tuesday, December 24, 2013

Write a program that stores the value in separate memory cells

Write a program that store the value “R”, “H”, 3.456E-6 and 50 in memory cells. Program should take 1st three value as input data, and use assignment value for last value

Source Code:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
 #include <stdio.h>
 #include <conio.h>
 void main ( )
 {
 clrscr ();
 char ch1, ch2;
 float db;
 int n;
 printf("\n  Enter two alphabet value, one exp value and one integer value: \n ");
 scanf(" %c %c %f ", ch1, ch2, db);
 n = 50 ;
 printf(" %d ", n);
 getch();
 }

Result:


Enter two alphabet value, one exp value and one integer value:
R  H  3.045E-6   50


No comments:

Post a Comment