• Home
  • Piracy & Policy
  • Disclaimer
  • Terms
  • About
  • Contact Us

Saroj Baniya

  • Home
  • Services
  • Blog
  • Contact
  • About Blog
  • _Terms & Conditions
  • _Piracy & Policy
  • _Disclaimer
  • _Contact
  • _About Us

Write a C Program to Display Whether You are Mr or Miss Given Your Gender as Input

Saroj July 11, 2022

In this tutorial learn how you can display whether you are Mr or Miss given your gender as input. Here we are using the if statement.

C programming is a powerful general-purpose programming language. It can be used to develop software like operating systems, databases, compilers, etc.


write c program to display whether you are mr or miss given your gender as input




Write a Program to Display Whether You are Mr or Miss Given Your Gender as Input

Here is the code to display whether you are Mr or Miss given your gender as input in C programming.

#include <stdio.h> //WAP to display whether you are Mr or Miss given your gender as input.
int main(){
    char gender;
    printf("Please enter your gender,M/F:");
    scanf("%c",&gender);
    if(gender=='M'  || gender == 'm')
        printf("You are Mr.");
    else printf("You are Miss.");
    return 0;
}

Test Live At Jdoodle



Conclusion

This is how you can display whether you are Mr or Miss given your gender as input. in C programming. Comment below if you like our tutorial.

C C Codes C programming Codes Coding How To Tutorial WAP

You may like these posts

0 Comments

Newer Older

Popular Posts

C Programming

3/C%20programming/post-list

Categories

  • Blogger 2
  • C programming 39

Tags

  • add smooth scrolling effect for blogger
  • add table in blogger post
  • Blogger
  • Blogger-Tricks
  • C
  • C Codes
  • C programming
  • Codes
  • Coding
  • How To
  • Tutorial
  • WAP

Search This Blog

Contact Info

I am live on these platform.Thus,you can contact me on the contact below.

Contact List

Facebook: facebook.com/saroj.baniya.3382
Mail: rosesaw20@gmail.com
Phone: +9779818434496

Contact Form

ReCreated By ©Copyright2022 Saroj Baniya
Created By SoraTemplates