Skip to main content

Add Two float in C programming

This code is very impotent for you , if you want to add two float   numbers . In this programmer  user input two number and output will be sum of two numbers . Sometimes we face some problem between %d and %f. In this code we try to solve this problem.


programmer-1653351_960_720


#include<stdio.h>
int main()
{
float a,b,c;
a=5.5;                       //a and b is float  number
b=10.5;
c=a+b;
printf("Sum of the value is = %f",c); // for float number we use %f
return 0;
}

Capture

Comments

Popular posts from this blog

GCD and LCM easy calculation.

C Program to Find LCM of two Numbers Examples on different ways to calculate the LCM (Lowest Common Multiple) of two integers using loops and decision making statements. To understand this example, you should have the knowledge of following  C programming topics: C Programming Operators C if...else Statement C Programming while and do...while Loop The LCM of two integers  n1  and  n2  is the smallest positive integer that is perfectly divisible by both  n1  and  n2  (without a remainder). For example: the LCM of 72 and 120 is 360. Example #1: LCM using while Loop and if Statement #include <stdio.h> int main () { int n1 , n2 , minMultiple ; printf ( "Enter two positive integers: " ); scanf ( "%d %d" , & n1 , & n2 ); // maximum number between n1 and n2 is stored in minMultiple minMultiple = ( n1 > n2 ) ? n1 : n2 ; // Always true while ( 1 ) ...

Difference Between Waterfall and Agile Model.

Waterfall methodology is a software development methodology that is based on sequential-linear approach of software development. It reinforces the notion of "define before design" and "design before code". Whereas agile is based on increamental-iterative approach where requirements are expected to change frequently. # Waterfall Agile 1. Waterfall methodology is sequential and linear. Agile methodology is increamental and iterative. 2. Requirements have to be freezed at the beginning of SDLC. Requirements are expected to change and changes are incorporated at any point. 3. Working model of software is delivered at the later phases of SDLC. Working model is delivered during initial phases and successive iteration of the model are delivered to the client for feedback. 4. It is difficult to scale-up projects based on waterfall methodology. Scaling up of products is easy because of the iterative approach. 5. Customers or end user doesn't have a...