#include Download presentation Presentation is loading. Please wait.
1
Programming in C Part 2
2
printf("enter value of a,b &c:"); scanf("%d%d%d",&a,&b,&c);
3
printf("enter any year:"); scanf("%d",&n); if(n%4==0)
4
Question Write a program to print your name, Reg_number, and date of birth.
Similar presentations © 2025 SlidePlayer.com. Inc. Log in
Similar presentations
Presentation on theme: "Programming in C Part 2."— Presentation transcript:
Program to print the greatest of three numbers #include<stdio.h> #include<conio.h> int main(void) { int a,b,c; printf("enter value of a,b &c:"); scanf("%d%d%d",&a,&b,&c); if((a>b)&&(a>c)) printf("%d is greatest",a); if((b>a)&&(b>c)) printf("%d is greatest",b); if((c>b)&&(c>a)) printf("%d is greatest",c); }
Program to find if a year is a leap year or not int n; printf("enter any year:"); scanf("%d",&n); if(n%4==0) printf("year is leap year"); else printf("year is not leap year");
Similar presentations
All rights reserved.