C programming
C programming

Programs in C language

Programs in C language

C programming

Programs in C language

 

Ques 1:   Write a program  to find out whether it is an odd number or even number.

#include<stdio.h>

int main()

{

int a;

printf(“\nEnter the number: “);

scanf(“%d”,&a);

if (a%2==0)

printf(“The number is even\n”);

else

printf(“The number is odd\n”):

return 0;

}

 

Ques 2:  Input 3 numbers and identify the greatest among the 3.

#include<stdio.h>

int main()

{

int x,y,z;

printf(“Enter 3 number\n”);

scanf(“%d%d%d”,&x,&y,&z);

     // if x is greater than y and z then x is greatest number

if (x>=y && x>=z){

printf(“%d is greatest number”, x);

}

         // if y is greater than x and z then y is greatest number

if (y>=x && y>=z){

printf(“%d is greatest number”, y);

}

           // if both of them is false then z is greatest number

else{

printf(“%d is greatest number” , z);

}

return 0;

}

 

 


 

Topics Covered :

  • c (programming language)
  • c programming language tutorial
  • c programming course
  • proramming journey
  • c programming
  • c programming for beginners
  • programiz learn programming
  • language basics
  • learn c programiz

 

 


 

Thanks for reading this blog. Hope you get satisfied with the blog and definitely this blog must have valued your time and effort of reading.

Take a time to connect our other digital creations such as Instagram , Facebook and Youtube.

 

🧑‍💻🧑‍💻 Social Media Links of Tech DCode :

👉🏻 YouTube : https://www.youtube.com/channel/UCjJnEdeugftBwQ3yMuD4B_A
👉🏻 Instagram : https://www.instagram.com/thetechdcode/
👉🏻 Facebook Page : https://www.facebook.com/thetechdcode
👉🏻 Twitter : https://twitter.com/thetechdcode
👉🏻 Telegram Channel : https://t.me/thetechdcode
👉🏻 Tech DCode Linktree : https://linktr.ee/thetechdcode
👉🏻 My Personal Handles : https://linktr.ee/virtualshivamin

🧑‍💻🧑‍💻 Social Media Links of SHIVAM SINGH (OWNER) :

👉🏻 Instagram : https://www.instagram.com/virtualshivamin/
👉🏻 Facebook Page : https://www.facebook.com/virtualshivamin/
👉🏻 Twitter : https://twitter.com/virtualshivamin/
👉🏻 Personal Linktree : https://linktr.ee/virtualshivamin 

 

Leave a Reply

Your email address will not be published. Required fields are marked *