#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?
689 visits
Outline:भ्यारीएबलको स्कोप -परिचय -भ्यारीएबल घोषणा गर्ने सिनट्याक्स --उदाहरण: डाटा-टाइप भ्यारीएबल-नाम; -भ्यारीएबल सुरु गर्ने सिनट्याक्स --उदाहरण: डाटा-टाइप भ्यारीएबल-नाम = मान; -भ्यारीएबलको स्कोप -ग्लोबल भ्यारीएबल -लोकल भ्यारीएबल -गल्ति
भ्यारीएबलको स्कोप -परिचय -भ्यारीएबल घोषणा गर्ने सिनट्याक्स --उदाहरण: डाटा-टाइप भ्यारीएबल-नाम; -भ्यारीएबल सुरु गर्ने सिनट्याक्स --उदाहरण: डाटा-टाइप भ्यारीएबल-नाम = मान; -भ्यारीएबलको स्कोप -ग्लोबल भ्यारीएबल -लोकल भ्यारीएबल -गल्ति
Show video info
Pre-requisite