Skip to main content

PROGRAME ABOUT TO FIND LEAP YEAR

SO TODAY WE WILL BE SEEING ABOUT HOW TO CHECK IF THE ENTERED YEAR IS A LEAP YEAR OR NOT SO THAT WE CAN HAVE A CLEAR IDEA ABOUT HOW TO USE THE PROGRAMING SKILLS TO MAKE THE PROGRAMS
SO LETS GET STARTED

#include<stdio.h>
#include<conio.h>
void main()
{
  int a;
 clrscr();
 printf("please enter a year");
 scanf("%d"&a);
 if(a%4==0 && a%400!=0 && a)
  printf("The entered yeaar is a leap year");
else
  printf("The entered year is not a leap year");
getch();
}


SO NOW WE WILL SE THE LOGIC BEHIND THE PROGRAM
AS WE KNOW THAT THE FIRST COMES THE HEADER FILE THEN THE MAIN FUNCTION
NOW THERE IS A DECLERATION OF VARIABLE (a) THE (CLRSCR) IS A FUNCTION WHICH WILL CLEAR THE SCREEN IT IS USEFULL TO CLEAR THE SCREEN IS WE HAVE DONE ANY PREVIOUS CODINGS OUTPUT.NOW THE PRINTF STATEMENT IS USD FOR THE PRINTING THE TEXT TO GIVE THE USER A CLEAR CUT MESSSAGE THAT HE WANTS TO ENTER A YEAR.THE SCANF FUNCTION IS FOR THE INPUT PURPOSE THE SCANF FUNCTION IS TO GET INPUT FROM THE END USER.SO THE IF STATEMENTS IS USED TO CHECK WHETHER THE INPUT SATISFIES THE CONDITION THAT ARE ENTERED IN PARENTHESIS OF THE IF STATEMENTIF IT SATISFIES THE CODE WRITEN IN THE IF STATEMENTS THAT WILL BE EXECUTED AND IF NOT THE ELSE STATEMENT WILL BE EXECUTED AND ATLAST THE GETCH IS TO TAKE ANY  KEYSTROKE FROM THE KEYBOARD
 SO THIS WAS THE CODEING FOR THE PROGRAM TO FIND A LEAP YEAR IF YOU FIND THIS TUTORIAL TO BE USEFULL

Comments

Popular posts from this blog

All about header files #header

So today we will be having an concentration on header files if you don't know what are header file do check read the full post So the header files that stdio conio they are the file list our doc file just the extension is .H the file contains all the information about the functions that are used to make the input output so they are having some of the meaning of the function so that the compiler can complie that means it can understand the function call we will go more in deep in the later post so this is the use of header file and it is the most important file for our code to run so that's all for today .

#Fortnite for andriod ??Download link

Here the beta version has been relased by the epic game you can download the game installer by clicking the link video it is the original link to the game download from the site epic games steps to download 1. Click on the link 2. The click on the download the Application will be download 3. Then install the app 4.You will be sent for the data obb download page 5. Now you can play the Fortnite game    If you wish to share this post with your friends you can share with them don't you forget to subscribe my blog.   Thank You and  check out the whole blog fir ethical hacking and facts post. DOWNLOAD LINK

First program for all #first

So today we will be seeing the first program that aLl might had know so leta get started so the programe #include<conio.h> #include<studio.h> void main() {  clrscr();  printf("hello world");  getch(); } So in the above programme there are the header files the a main function in that there is a predefined function printf,clrscr and getch also the ; it to matters alot as it shows that it is an end of the line or command.so this is the simple discription of the program you can to make small programs. 

Total Pageviews