I love you a lot mam. Only because of you I had passed in my Data structure subject. I had miss 2 months of online classes due to dengue fever but covered all the syllabus Only in 3 days. Thanks a lot mam.
assignment: #include void num(int); void main() { int x; printf("enter the value of x"); scanf("%d",&x); num(x); } void num(int x) { if(x%2==0) printf("the number is even"); else printf("the number is odd");
I come through to your channel while searching for merge sort algorithm. Till then i have become a big fan of you. I cannot believe that these teachers also exists. I haven't seen someone explaining with so much detail. Your teaching patience level is ultra pro max and everyone even the person who don't like to code will get motivated and understand your lectures.
Assignment for one int and one float #include void sum(int, float); void main() { int a; float b; printf("enter a int and float value "); scanf("%d %f", &a, &b); sum(a,b); } void sum(int x, float y) { printf("%f", (x+y)); }
*write a function for calculating the sum which is taking two arguments as int and float datatype* #include void sum(int,float); // function declaration void sum(int a,float b) //function definition { float s; s = a+b; printf("the sum is : %f",s); } void main() { int x; float y; printf("enter two number :"); scanf("%d",&x); scanf("%f",&y); sum(x,y); //function calling }
If I write this type in function calling like.. Void main() { Some statements..... Scanf........... 👉 Sum(y,x); 👈 } So what would be the output according to ur program ?? compiler will take y rather than x?? Int or float //hope u can understand my doubt..
14:18 #include void evenodd(int); //function declaration with one interger type argument void main(){ int EO; printf("Enter a number: "); //User input scanf("%d", &EO); // Scanning evenodd(EO); //calling function with variable } void evenodd(int num) //defination with argument and variable { //Logic for Identifying even odd numbers and printing them (num%2==0)? printf("%d is an even number ", num) : printf("%d is an odd number ", num); } 20:21 #include void sum(int, float); //function declaration with one interger and one float argument void main(){ int a; float b; printf("Enter two numbers: "); //User input and scanning scanf("%d %f", &a, &b); sum(a , b); // calling function with variables } //defination with integer and variables void sum (int x, float y){ float sum=0.0; sum = x+y; printf("SUM: %f ", sum); // Printing the sum }
Program for sum of an integer and float #include void sum(int ,float); void main() { int x; float y; printf("Enter x and y:"); scanf("%d %f",&x,&y); sum(x,y); } void sum(int a,float b) { float s=0; s=a+b; printf("sum=%f",s); } Output: Enter x and y:5 1.6 sum=6.600000
#include void sum(int , float); int main(){ int a = 5; float b = 7.9; sum(a , b); return 0; } void sum(int a , float b){ float sum = a + b; printf("%f",sum); }
Madem your teaching method is soo brilliant.. i have missed some online classes due to covid-19.. And now i am learning c programing to you.....you are a good moderator .. And mam please start the course of object orientated programing.plz plz. 😊...be happy in life.
sum of int and float:= #include void sum(int,float); int main() { int a; float b; printf("enter no int and float"); scanf("%d%f",&a,&b); sum(a,b); return 0; } void sum(int a,float b) { float sum=0.0; sum=a+b; printf("sum is %f",sum); }
*write a function that takes one argument as an input to check whether a number is even or odd :* #include void evenorodd(int); //function declaration void evenorodd(int a) //function definition { if(a%2==0) { printf("%d = even !",a); } else { printf("%d = odd !",a); } } void main() { int x; printf("Enter a number to check whether its odd or even :"); scanf("%d",&x); evenorodd(x); // calling the function }
//Function with Argument and without Return Type //Home assignment nb.2: #include void sum(int, float); int main(void) { int a; float b; printf("Enter a: "); scanf("%d", &a); printf("Enter b: "); scanf("%f", &b); sum(a, b); } void sum(int a, float b) { float s = 0; s = a + b; printf("Sum = %f ", s); }
For the question in 14: 10 #include void EvenOrOdd(int); void main(void) { int x; printf("Enter a number: "); scanf("%d", &x); EvenOrOdd(x); } void EvenOrOdd(int a) { if (a % 2 == 0) { printf("Even"); } else { printf("Odd"); } }
~ with argument and without return type #include int fun(int);//function declaration void main()//main function { fun(5);//function calling } int fun(int n)//function definition { scanf("%d",&n); if(n%2==0) { printf("number is even "); } else { printf("numbre is odd "); } }
//WAP taking one argument as input and check the number is even or odd //With argument & no return type #include void a(int); void main() { int x; printf("Enter a positive number :- "); scanf("%d", &x); a(x); } void a(int x) { if(x%2==0) { printf("Even number "); } else { printf("Odd number"); } }
#include void detect(int); int main() { int a; printf("enter the number you want to know even or odd "); scanf("%d",&a); detect(a); return 0; } void detect(int x){ if(x
/*P6.10 Program to find out the factorial of a number*/ #include long int factorial(int n); int main(void) { int num; printf("Enter a number : "); scanf("%d",&num); if(num1; i--) fact*=i; return fact; }
i have written in C++: void isEven(int); // Declare function int main() { int a; cout a; isEven(a); return 0; } void isEven(int x) { int val = x % 2; // we will use modular here as the remainder is not equal to zero means its an odd number. if (val == 0) { cout
Hamko yeh lagta hee nahee, tum dur kahee se aayee ho Jaise mere sapno me tumharee pehle se parchayee ho Mujhko bhee sang rah me tere chalna acha lagta hai Bada safar hai jivan me joh itna sachcha lagta hai.... I am from Sri Lanka
Solution to the assignment. #include void even_odd(int); int main() { int x; printf("Enter a number "); scanf("%d" , &x); even_odd(x); } void even_odd(int a) { if (a%2==0) printf("Number is even"); else printf("Number is odd"); }
//function with Arguments and without return value #include void number(int); void main() { int num; printf("enter a number:"); scanf("%d",&num); number(num); } void number(int x) { if(x % 2 == 0) { printf("it is even number"); } else { printf("it is odd number"); } }
WAP that takes one input as argument and checks if the inputted number is odd or even:- #include void evenodd(int); void main() { int a; printf("Enter a number: "); scanf("%d", &a); evenodd(a); } void evenodd(int x) { if(x % 2 == 0) printf("%d is an even number", x); else printf("%d is an odd number", x); }
Here you have an example of a program that checks if a number is even, odd and treats as error numbers that are negative: #include // program that checks if a number is even or odd; void eoo(int); int main() { int a; printf("Enter a number: "); scanf("%d", &a); eoo(a); return 0; } void eoo(int a) { if (a % 2 == 0) { printf("Is even."); } else if (a % 2 != 0) { printf("Is odd."); } else if (a < 0) { printf("You entered negative number."); } }
#include void isEven(int); void main(void) { int number; printf("Enter any number "); scanf("%d", &number); isEven(number); } void isEven(int x) { if( x % 2 == 0) printf("%d is an even number", x); else printf("%d is an odd number", x); }
ma'am the assignment which u have given to us at the end of this video The code using (int,float) parameters but im not getting the logic part while defining the function i have pasted the code below can u say what to do if we are having int a, float b as parameters and then how do we write the logic part ??? pls ma'am im not getting this #include void sum(int,float); void main() { int x; float y; printf("Enter x and y "); scanf("%d %f", &x,&y); sum(x,y); } void sum(int a,float b) { float s=0; s = a+b; printf("sum = %f ",s); }
#include Void even(int); Void main () { Int a; Printf ("enter a number"); Scand("%d",&a); even(a); } Void even ( int x) { Int n; n=x%2; If(n==0) { Printf (" %d is an even number",x); } Printf ("%d is an odd number",x); }
#include void fun(int); void main () { int a; printf("enter the value of a:"); scanf("%d",&a); fun(a); } void fun(int a) { if(a%2==0) printf("the value of a is even:"); else printf("the value of a is odd:"); }
#include void fuc(int); void fuc(int x) { if (x % 2 == 0) { printf("Given number is even "); } else { printf("Given number is not even "); } } void main() { int a; printf("Enter number a "); scanf("%d", &a); fuc(a); } thats it
#include #include void fun(int); void main() { int x; fun(x); } void fun(int x) { int a; printf("enter the number"); scanf("%d",&a); if(a%2==0) { printf("given number is even"); } else printf("the given number is odd"); }
#include void even_odd(int n) { if (n % 2 == 0) printf("You have entered an even number"); else printf("You have entered an odd number"); } void main(void) { int n; printf("Enter an number: "); scanf("%d", &n); even_odd(n); }
#include void fun(int); int main() { int x; printf("enter a number; "); scanf("%d",&x); fun(x); } void fun(int x) { if(x%2==0) printf("%d is an even number",x); else printf("%d is odd number",x); }
#include void evenOdd(int); int main(){ int n; printf("Enter the no. to cheack weather its even or odd :"); scanf("%d",&n); evenOdd(n); return 0; } void evenOdd(int n){ if(n%2 == 0){ printf("%d is a even no.",n); } else printf("%d is a Odd no.",n); }
I love you a lot mam. Only because of you I had passed in my Data structure subject. I had miss 2 months of online classes due to dengue fever but covered all the syllabus Only in 3 days. Thanks a lot mam.
Nuvvu great bro 🙌🏻👍🏻
Keep it up ☺️
oohh damn! only in 3 days !!!!!! congo vro
Everyone love her 🤣
assignment:
#include
void num(int);
void main()
{
int x;
printf("enter the value of x");
scanf("%d",&x);
num(x);
}
void num(int x)
{
if(x%2==0)
printf("the number is even");
else
printf("the number is odd");
}
If I use / instead of % will it work in my laptop I didn't work
@@NNN-sl3pd no bcz we need remainder which we get from % , divide / give us quotient
I come through to your channel while searching for merge sort algorithm. Till then i have become a big fan of you. I cannot believe that these teachers also exists. I haven't seen someone explaining with so much detail. Your teaching patience level is ultra pro max and everyone even the person who don't like to code will get motivated and understand your lectures.
Assignment for one int and one float
#include
void sum(int, float);
void main()
{
int a;
float b;
printf("enter a int and float value ");
scanf("%d %f", &a, &b);
sum(a,b);
}
void sum(int x, float y)
{
printf("%f", (x+y));
}
Void fn(int) ;
Void main()
{
Int a=10;
Fn(a);
}
Void(int z)
{
If(z%2==0)
{
Printf (" Given input is even") ;
}
Else
Printf("not even") ;
}
In function definition
You forgot to write function name fun😊
in the 7th line, function name is not written. The correct statement is Void Fn(int z). The remaining program is correct
Fifth line is error in 1st line you declared correctly but in fifth line you made spell error wrong:Fn(a) correct:fn(a)
*write a function for calculating the sum which is taking two arguments as int and float datatype*
#include
void sum(int,float); // function declaration
void sum(int a,float b) //function definition
{
float s;
s = a+b;
printf("the sum is : %f",s);
}
void main()
{
int x;
float y;
printf("enter two number :");
scanf("%d",&x);
scanf("%f",&y);
sum(x,y); //function calling
}
If I write this type in function calling like..
Void main()
{
Some statements.....
Scanf...........
👉 Sum(y,x); 👈
}
So what would be the output according to ur program ??
compiler will take y rather than x??
Int or float //hope u can understand my doubt..
what is the reason for taking float s; instead of int in function definition
@@deekshith6049 because our ans will in decimal form basic math rule
14:18
#include
void evenodd(int); //function declaration with one interger type argument
void main(){
int EO;
printf("Enter a number: "); //User input
scanf("%d", &EO); // Scanning
evenodd(EO); //calling function with variable
}
void evenodd(int num) //defination with argument and variable
{
//Logic for Identifying even odd numbers and printing them
(num%2==0)? printf("%d is an even number
", num) : printf("%d is an odd number
", num);
}
20:21
#include
void sum(int, float); //function declaration with one interger and one float argument
void main(){
int a;
float b;
printf("Enter two numbers: "); //User input and scanning
scanf("%d %f", &a, &b);
sum(a , b); // calling function with variables
}
//defination with integer and variables
void sum (int x, float y){
float sum=0.0;
sum = x+y;
printf("SUM: %f
", sum); // Printing the sum
}
Program for sum of an integer and float
#include
void sum(int ,float);
void main()
{
int x;
float y;
printf("Enter x and y:");
scanf("%d %f",&x,&y);
sum(x,y);
}
void sum(int a,float b)
{
float s=0;
s=a+b;
printf("sum=%f",s);
}
Output:
Enter x and y:5 1.6
sum=6.600000
#include
void sum(int , float);
int main(){
int a = 5;
float b = 7.9;
sum(a , b);
return 0;
}
void sum(int a , float b){
float sum = a + b;
printf("%f",sum);
}
Madem your teaching method is soo brilliant.. i have missed some online classes due to covid-19.. And now i am learning c programing to you.....you are a good moderator .. And mam please start the course of object orientated programing.plz plz.
😊...be happy in life.
Now I understand functions just because of you and your efforts mam. Thanks you mam.
நான் தமிழன் உங்கள் வீடியோ அருமையாக உள்ளது
Translate I am Tamilnadu your video amazing
nanum bro
Each and every topic explain briefly,we need to gain proper knowledge mam😌
Thanku soo much mam…the one and only reason of me getting placed is u and the dsa playlist..thanku so much mammm
void check(int);
void check(int n)
{
if(n%2==0)
{
printf("Even");
}
else
printf("Odd");
}
void main()
{ int a;
printf("Enter an integer:");
scanf("%d",&a);
check(a);
}
sum of int and float:=
#include
void sum(int,float);
int main()
{
int a;
float b;
printf("enter no int and float");
scanf("%d%f",&a,&b);
sum(a,b);
return 0;
}
void sum(int a,float b)
{
float sum=0.0;
sum=a+b;
printf("sum is %f",sum);
}
*write a function that takes one argument as an input to check whether a number is even or odd :*
#include
void evenorodd(int); //function declaration
void evenorodd(int a) //function definition
{
if(a%2==0)
{
printf("%d = even !",a);
}
else
{
printf("%d = odd !",a);
}
}
void main()
{
int x;
printf("Enter a number to check whether its odd or even :");
scanf("%d",&x);
evenorodd(x); // calling the function
}
U don't need to declare the function if you are starting with definition
//Function with Argument and without Return Type
//Home assignment nb.2:
#include
void sum(int, float);
int main(void)
{
int a;
float b;
printf("Enter a:
");
scanf("%d", &a);
printf("Enter b:
");
scanf("%f", &b);
sum(a, b);
}
void sum(int a, float b)
{
float s = 0;
s = a + b;
printf("Sum = %f
", s);
}
For the question in 14: 10
#include
void EvenOrOdd(int);
void main(void)
{
int x;
printf("Enter a number: ");
scanf("%d", &x);
EvenOrOdd(x);
}
void EvenOrOdd(int a)
{
if (a % 2 == 0)
{
printf("Even");
}
else
{
printf("Odd");
}
}
~ with argument and without return type
#include
int fun(int);//function declaration
void main()//main function
{
fun(5);//function calling
}
int fun(int n)//function definition
{
scanf("%d",&n);
if(n%2==0)
{
printf("number is even
");
}
else
{
printf("numbre is odd
");
}
}
//WAP taking one argument as input and check the number is even or odd
//With argument & no return type
#include
void a(int);
void main()
{
int x;
printf("Enter a positive number :- ");
scanf("%d", &x);
a(x);
}
void a(int x)
{
if(x%2==0)
{
printf("Even number
");
}
else
{
printf("Odd number");
}
}
Ma'am please make video to explain full java language. Please teach java ma'am.
i am fall in love with this subject now 😊
Thank you ma'am
Ur one of my favourite teacher
Assignment even/odd
#include
void EO(int);
int main()
{
int a;
scanf("%d",&a);
EO(a);
}
void EO(int x)
{
if(x%2==0)
printf("It is even ");
else
printf("It is odd ");
}
Thanku for this you explains very good 👍❤️
Tqs mam🥰❤️
Love from Nepal 🇳🇵
Great explanation mam 🔥🔥❤️
How to receive your topics wise or chapter wise videos of C pro.
//Arguement without return type
#include
void sum(int, float);
void main(){
int a;
float b;
printf("enter a and b:
");
scanf("%d%f",&a,&b);
sum(a,b);
}
void sum(int x, float y){
printf("sum=%f",x+y);
}
#include
void num(int);
void main()
{
int a;
printf("enter any number:");
scanf("%d",&a);
num(a);
}
void num(int x)
{
if(x%2==0)
printf("even");
else
printf("Odd");
}
#include
void detect(int);
int main() {
int a;
printf("enter the number you want to know even or odd
");
scanf("%d",&a);
detect(a);
return 0;
}
void detect(int x){
if(x
I love you mam and I am impressed by you teaching
Doubt ☝️✋✋✋✋✋
Can we take float in declaration and definition as return type and can we not return anything?
#include
void sum(int, float);
void main()
{
int a;
float b;
printf("enter two numbers:");
scanf("%d%f",&a,&b);
sum(a, b);
}
void sum(int x, float y)
{
float sum;
sum=x+y;
printf("sum=%f",sum);
}
you are genius mam... thank you so much for all your videos...😊😊😊
/*P6.10 Program to find out the factorial of a number*/
#include
long int factorial(int n);
int main(void)
{
int num;
printf("Enter a number : ");
scanf("%d",&num);
if(num1; i--)
fact*=i;
return fact;
}
i have written in C++:
void isEven(int); // Declare function
int main()
{
int a;
cout a;
isEven(a);
return 0;
}
void isEven(int x)
{
int val = x % 2; // we will use modular here as the remainder is not equal to zero means its an odd number.
if (val == 0)
{
cout
Hamko yeh lagta hee nahee, tum dur kahee se aayee ho
Jaise mere sapno me tumharee pehle se parchayee ho
Mujhko bhee sang rah me tere chalna acha lagta hai
Bada safar hai jivan me joh itna sachcha lagta hai....
I am from Sri Lanka
and I am learning programming too.
Everything is fine but wht abut ur expression a bit expression will be perfect for teaching 👍
Mam thanks for your efforts
Solution to the assignment.
#include
void even_odd(int);
int main()
{
int x;
printf("Enter a number
");
scanf("%d" , &x);
even_odd(x);
}
void even_odd(int a)
{
if (a%2==0)
printf("Number is even");
else
printf("Number is odd");
}
Mam, can't we write float sum=o ;
Sum=a+b; instead of s in the definition part? Pls reply
Thank you 🙇🏻♂️ 😊mam❤
Samj naya aya par dekh ke achha laga 🙂
//function with Arguments and without return value
#include
void number(int);
void main()
{
int num;
printf("enter a number:");
scanf("%d",&num);
number(num);
}
void number(int x)
{
if(x % 2 == 0)
{
printf("it is even number");
}
else
{
printf("it is odd number");
}
}
at 10:20 mam laugh is tells everything🤪🤪🤪
Nice teaching❤🎉
Mam please make a video on Recursion
Very good explanation
WAP that takes one input as argument and checks if the inputted number is odd or even:-
#include
void evenodd(int);
void main()
{
int a;
printf("Enter a number: ");
scanf("%d", &a);
evenodd(a);
}
void evenodd(int x)
{
if(x % 2 == 0)
printf("%d is an even number", x);
else
printf("%d is an odd number", x);
}
Love u maam...
From Bangladesh
thank you mam
Live you mam❤️
Mam please do c++ teaching.please
My god shes beautiful ❤️😍......
Here you have an example of a program that checks if a number is even, odd and treats as error numbers that are negative:
#include
// program that checks if a number is even or odd;
void eoo(int);
int main() {
int a;
printf("Enter a number: ");
scanf("%d", &a);
eoo(a);
return 0;
}
void eoo(int a) {
if (a % 2 == 0) {
printf("Is even.");
} else if (a % 2 != 0) {
printf("Is odd.");
} else if (a < 0) {
printf("You entered negative number.");
}
}
❤❤❤❤❤thanks mam
Is this also for bca 2 nd year student as i also have data structure 🤔
❣️Great👍
🙏 nice maam 🙏
Tq mam
Thanks mam
#include
void isEven(int);
void main(void)
{
int number;
printf("Enter any number
");
scanf("%d", &number);
isEven(number);
}
void isEven(int x)
{
if( x % 2 == 0)
printf("%d is an even number", x);
else
printf("%d is an odd number", x);
}
Assignment:
#include
void eveodd(int);
void main()
{
int a;
printf("Enter a Value ");
scanf("%d", &a);
eveodd(a);
}
void eveodd(int x)
{
if(x%2 == 0)
printf("even");
else
printf("odd");
}
ma'am the assignment which u have given to us at the end of this video
The code using (int,float) parameters
but im not getting the logic part while defining the function
i have pasted the code below
can u say what to do if we are having int a, float b as parameters and then how do we write the logic part ??? pls ma'am im not getting this
#include
void sum(int,float);
void main()
{
int x;
float y;
printf("Enter x and y
");
scanf("%d %f", &x,&y);
sum(x,y);
}
void sum(int a,float b)
{
float s=0;
s = a+b;
printf("sum = %f
",s);
}
here in void sum(int a, float b)
{
here the logic part im not getting what to write
}
Mam you are sach a beautiful 😍
#include
Void even(int);
Void main ()
{
Int a;
Printf ("enter a number");
Scand("%d",&a);
even(a);
}
Void even ( int x)
{
Int n;
n=x%2;
If(n==0)
{
Printf (" %d is an even number",x);
}
Printf ("%d is an odd number",x);
}
Very nice 😍
Excellent 😘😘😘
love you mam❤️❤️❤️❤️❤️❤️
I didn't understand
Ma'am if you will explain in Hindi i think we would be able to grasp faster
Jenny mam😍
Ma'am i want to work with you as a thumbnail editor plz reply me if you are interested in it i will send some samples.
Thank you.
I love you 💝❤️💛💛💛💛💛
Assignment
#include
void fun(int);
int main(){
float a;
printf("Enter : ");
scanf("%f", &a);
/*printf("Enter b's value: ");
scanf("%f", &b);*/
fun(a);
return 0;
}
void fun(int x){
if(x%2==0){
printf("It's an even number");
}else{
printf("It is an odd number");
}
}
Kab tak ye course khatam ho jayega?
Mam please dbms
First comment ❤❤
👍
maam aap khaaa thii ap se hi ab padhungaa.......maam ap apna no. do naa aap se baat karna haii lovee youu mamm
second comment
I love you mam🥰🥰🥰🥰🥰
I too love 💕 her she is mine
✌️😈⚡️
Assignment:
#include
void evenOdd(int);
void main()
{
int y;
printf("Enter a number: ");
scanf("%d",&y);
evenOdd(y);
}
void evenOdd(int x)
{
if(x%2==0)
{
printf("Even");
}
else
{
printf("Odd");
}
}
#include
void fun(int);
void main ()
{
int a;
printf("enter the value of a:");
scanf("%d",&a);
fun(a);
}
void fun(int a)
{
if(a%2==0)
printf("the value of a is even:");
else
printf("the value of a is odd:");
}
#include
void even(int);
int main()
{
int a;
printf("enter no");
scanf("%d",&a);
even(a);
return 0;
}
void even(int a)
{
if(a%2==0)
{
printf("even");
}
else
printf("Odd");
}
#include
void sum(int);
void main()
{
int a;
printf("Enter an integer:");
scanf("%d",&a);
sum(a);
}
void sum (int x)
{
if(x%2 == 0)
printf("%d is even.",x);
else
printf("%d is odd.",x);
}
#include
void oddoreven(int);
void main(void)
{
int num;
printf("Enter a number:
");
scanf("%d", &num);
oddoreven(num);
}
void oddoreven(int a)
{
if ((a % 2) == 0)
printf("Number is even!
");
else
printf("Number is odd!
");
}
#include
int sum(float,int);
void main()
{
float a;
int b;
printf("enter a & b:");
scanf("%f%d",&a,&b);
sum(a,b);
}
int sum(float x, int y)
{
float s=0;
s=x+y;
printf("sum=%f%d
",s);
}
#include
void fuc(int);
void fuc(int x)
{
if (x % 2 == 0)
{
printf("Given number is even
");
}
else
{
printf("Given number is not even
");
}
}
void main()
{
int a;
printf("Enter number a
");
scanf("%d", &a);
fuc(a);
}
thats it
#include
#include
void fun(int);
void main()
{ int x;
fun(x);
}
void fun(int x)
{
int a;
printf("enter the number");
scanf("%d",&a);
if(a%2==0)
{
printf("given number is even");
}
else
printf("the given number is odd");
}
#include
void even_odd(int n)
{
if (n % 2 == 0)
printf("You have entered an even number");
else
printf("You have entered an odd number");
}
void main(void)
{
int n;
printf("Enter an number: ");
scanf("%d", &n);
even_odd(n);
}
//EVEN ODD CODE:
#include
void evod(int);
void main()
{
int x;
printf("Enter the number: ");
scanf("%d", &x);
evod(x);
}
void evod(int a)
{
if (a%2==0)
{
printf("The number is even");
}
else{
printf("The number is odd");
}
}
#include
void sum(int x);
void main() {
int x;
printf("Enter a number: ");
scanf("%d", &x);
sum(x);
}
void sum(int x) {
if (x % 2 == 0) {
printf("The number %d is even
", x);
}else{
printf("The number %d is odd
", x);
}
}
#include
void fun(int);
int main()
{
int x;
printf("enter a number;
");
scanf("%d",&x);
fun(x);
}
void fun(int x)
{
if(x%2==0)
printf("%d is an even number",x);
else
printf("%d is odd number",x);
}
#include
void evenOdd(int);
int main(){
int n;
printf("Enter the no. to cheack weather its even or odd :");
scanf("%d",&n);
evenOdd(n);
return 0;
}
void evenOdd(int n){
if(n%2 == 0){
printf("%d is a even no.",n);
}
else
printf("%d is a Odd no.",n);
}