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 }
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.
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); }
*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 }
#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
//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"); } }
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); }
//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); }
~ 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 "); } }
/*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; }
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); }
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"); } }
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
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."); } }
//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); }
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"); }
#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 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); }
#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 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_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 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); }
#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); }
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
}
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.
நான் தமிழன் உங்கள் வீடியோ அருமையாக உள்ளது
Translate I am Tamilnadu your video amazing
nanum bro
Now I understand functions just because of you and your efforts mam. Thanks you mam.
Each and every topic explain briefly,we need to gain proper knowledge mam😌
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
Thanku soo much mam…the one and only reason of me getting placed is u and the dsa playlist..thanku so much mammm
#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);
}
i am fall in love with this subject now 😊
Great explanation mam 🔥🔥❤️
*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
Tqs mam🥰❤️
Love from Nepal 🇳🇵
#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
Thank you ma'am
Ur one of my favourite teacher
Thanku for this you explains very good 👍❤️
at 10:20 mam laugh is tells everything🤪🤪🤪
Ma'am please make video to explain full java language. Please teach java ma'am.
Nice teaching❤🎉
How to receive your topics wise or chapter wise videos of C pro.
Thank you 🙇🏻♂️ 😊mam❤
//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");
}
}
you are genius mam... thank you so much for all your videos...😊😊😊
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);
}
//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);
}
#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");
}
❤❤❤❤❤thanks mam
I love you mam and I am impressed by you teaching
❣️Great👍
Mam thanks for your efforts
~ 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
");
}
}
Mam, can't we write float sum=o ;
Sum=a+b; instead of s in the definition part? Pls reply
Live you mam❤️
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);
}
#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);
}
🙏 nice maam 🙏
Love u maam...
From Bangladesh
/*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;
}
Doubt ☝️✋✋✋✋✋
Can we take float in declaration and definition as return type and can we not return anything?
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
}
Very good explanation
Samj naya aya par dekh ke achha laga 🙂
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");
}
}
Excellent 😘😘😘
My god shes beautiful ❤️😍......
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 ");
}
love you mam❤️❤️❤️❤️❤️❤️
thank you mam
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
//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);
}
Very nice 😍
Mam you are sach a beautiful 😍
I love you 💝❤️💛💛💛💛💛
Is this also for bca 2 nd year student as i also have data structure 🤔
Mam please make a video on Recursion
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.
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.");
}
}
Tq mam
Thanks mam
//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");
}
}
Everything is fine but wht abut ur expression a bit expression will be perfect for teaching 👍
First comment ❤❤
Jenny mam😍
Mam please do c++ teaching.please
Kab tak ye course khatam ho jayega?
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);
}
I love you mam🥰🥰🥰🥰🥰
I too love 💕 her she is mine
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.
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 please dbms
I didn't understand
👍
maam aap khaaa thii ap se hi ab padhungaa.......maam ap apna no. do naa aap se baat karna haii lovee youu mamm
#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);
}
✌️😈⚡️
second comment
Ma'am if you will explain in Hindi i think we would be able to grasp faster
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");
}
#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 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 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);
}
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");
}
}
#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 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 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 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);
}
}
//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 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 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);
}
#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);
}