Contact : +88 01840-723661

|

Email : info@jakafind.com

Cpp Programming Practice Part-02

C++ Programming Practice Part-02

#include <stdio.h>
main()
{
int dec = 5;
char str[] = “abc”;
char ch = ‘s’;
float pi = 3.1416;
printf (“%d %s %f %c\n”, dec, str, pi, ch);
}

#include<stdio.h>
#include<conio.h>
int main ( )
{
    int year;
    printf(“Enter year”);
    scanf(“%d”,& year);
    if (year % 400==0)
    printf(“%d is Leap Year”,year);
    else if (year %100 == 0)
      printf(“%d is not Leap Year”,year);
    else if (year %4 == 0)
    printf(“%d is Leap Year”,year);
    else
     printf(“%d is Leap Year”,year);
     getch ( );
     return 0;
}

Leave a Reply

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