#include<stdio.h>int main(){ float number, square; printf("Please Enter any integer Value:); scanf("%f", &number); square number number; printf("square of a given number %.2f is =%.2f", number, square); return 0;}ByPooja.N.LECE departmentIRTT
Program
#include<stdio.h>int main( ){ int a,b; int diff; printf("Enter first number :"); scanf("%d",&a); printf("Enter second number :"); scanf("%d",&b); if(a>b) diff=a-b; else diff=b-a; printf("\n Difference between %d and %d is=%d",a,b,diff); return 0;}ByKeerthi vennila SEce departmentIrtt
#include <stdio.h>int main(){ int a,b; int diff; printf("Enter first number: "); scanf("%d",&a) printf("Enter second number: "); scanf("%d",&b) if( a>b ) diff=a-b; else diff=b-a; printf("\n Difference between %d and %d is = %d", a, b, diff); return 0;}BYShamraj Babu.TECE DepartmentIRTT
#include <stdio.h>int main(){ int a,b; int diff; printf("Enter first number: "); scanf("%d",&a); printf("Enter second number: "); scanf("%d",&b); if( a>b) diff=a-b; else diff=b-a; printf("\nDifference between %d and %d is = %d", a,b,diff); return 0;}By M. Bala priyadharshini ECE department IRTT
#include<stdio.h>int main( ){ int a,b; int diff; printf("Enter first number :"); scanf("%d",&a); printf("Enter second number :"); scanf("%d",&b); if(a>b) diff=a-b; else diff=b-a; printf("\n Difference between %d and %d is=%d",a,b,diff); return 0;}
Why is the following code wrong? Why can't the main function return float data type? What to do if we have to find the difference between two floating numbers?Please explain.#include <stdio.h>void difference(float a, float b){ float c = a-b; printf("The difference between x and y is %f\n", c);}float main(){ float x,y; printf("Enter the number 1:"); scanf("%f", &x); printf("Enter the number 2:"); scanf("%f", &y); difference(x,y); return 0;}
What is the difference between a global declaration and Extern. How it differs as both does the same operation
what is the use of namespace in scope of variables?
880 visits
Outline:Outline: ভেৰিয়েবলৰ পৰিসৰ (Scope of Variables) -পৰিচয় (Introduction) -ভেৰিয়েবল(variable) এটা ঘোষণা(declaring) কৰাৰ গাঠনি (Syntax) --উদাহৰণ: data-type var-name; -ভেৰিয়েবল(variable) এটা প্ৰাৰম্ভিকৰণ(initialized) কৰাৰ গাঠনি(Syntax) --উদাহৰণ: data-type var-name = value; -ভেৰিয়েবলৰ পৰিসৰ (Scope of Variables) -গ্ল’বেল ভেৰিয়েবল ( Global variable) -ল’কেল ভেৰিয়েবল ( Local variable) -ভুল (Error)
Outline: ভেৰিয়েবলৰ পৰিসৰ (Scope of Variables) -পৰিচয় (Introduction) -ভেৰিয়েবল(variable) এটা ঘোষণা(declaring) কৰাৰ গাঠনি (Syntax) --উদাহৰণ: data-type var-name; -ভেৰিয়েবল(variable) এটা প্ৰাৰম্ভিকৰণ(initialized) কৰাৰ গাঠনি(Syntax) --উদাহৰণ: data-type var-name = value; -ভেৰিয়েবলৰ পৰিসৰ (Scope of Variables) -গ্ল’বেল ভেৰিয়েবল ( Global variable) -ল’কেল ভেৰিয়েবল ( Local variable) -ভুল (Error)
Show video info
Pre-requisite