Sunday, 30 June 2019
Tuesday, 25 June 2019
To check whether a number is divisible by 6 and 4
Irawen June 25, 2019 No comments
To check whether a number is divisible by 6 and 4
Input :
Output :
Code :
#include <stdio.h>
int main()
{
int c;
printf("Enter a number :\n");
scanf("%d",&c);
{ if ((c%6==0) && (c%4==0))
printf("The number is divisible by 6 and 4\n");
else
printf("The number is not divisible by 6 and 4\n");
}
return 0;
}
Input :
Output :
Code :
#include <stdio.h>
int main()
{
int c;
printf("Enter a number :\n");
scanf("%d",&c);
{ if ((c%6==0) && (c%4==0))
printf("The number is divisible by 6 and 4\n");
else
printf("The number is not divisible by 6 and 4\n");
}
return 0;
}
Monday, 24 June 2019
To Check whether a number is prime or not
Irawen June 24, 2019 No comments
To Check whether a number is prime or not
Input:-

Output:-
1)

2)

Code:-
#include <stdio.h>
#include <stdlib.h>
int main()
{
int a,i,ans;
printf("Enter a number : \n");
scanf("%d",&a);
for(i=2; i<=a/2;i++ )
ans=a%i;
{
if ( ans==0)
printf("The number is not prime ");
else
printf("The number is prime ");
}
return 0;
}
Input:-
Output:-
1)
2)
Code:-
#include <stdio.h>
#include <stdlib.h>
int main()
{
int a,i,ans;
printf("Enter a number : \n");
scanf("%d",&a);
for(i=2; i<=a/2;i++ )
ans=a%i;
{
if ( ans==0)
printf("The number is not prime ");
else
printf("The number is prime ");
}
return 0;
}
Program to check divisibility by 5
Irawen June 24, 2019 No comments
Program to check divisibility by 5
Input:
Output:
1)

2)
Code:
#include <stdio.h>
#include <stdlib.h>
int main()
{
int a;
printf("Enter a number : \n");
scanf("%d",&a);
{
if ( a%5==0)
printf("The number is divisible by 5 ");
else
printf("The number is not divisible by 5 ");
}
return 0;
}
Input:
Output:
1)
2)
Code:
#include <stdio.h>
#include <stdlib.h>
int main()
{
int a;
printf("Enter a number : \n");
scanf("%d",&a);
{
if ( a%5==0)
printf("The number is divisible by 5 ");
else
printf("The number is not divisible by 5 ");
}
return 0;
}
Sunday, 23 June 2019
C Program to check sum is less than or greater than hundred
Irawen June 23, 2019 No comments
C Program to check sum is less than or greater than hundred
Input :-
Output :-
1)
2)
3)
Code :-
#include <stdio.h>
#include <stdlib.h>
int main()
{
int a, b,c;
printf("Enter a number \n");
scanf("%d",&a );
printf("Enter another number \n");
scanf("%d",&b);
c=a+b;
printf("The Sum is = %d\n\n",c);
{
if (c<100)
printf("The Sum Is Less Than Hundred \n\n\n");
else if (c==100)
printf("The sum is hundred");
else
printf("The sum is greater than hundred \n\n\n\n");
}
return 0;
}
Saturday, 22 June 2019
Popular Posts
-
What you'll learn Understand why version control is a fundamental tool for coding and collaboration Install and run Git on your local ...
-
Explanation of the Code s = 'robot' # Assign the string 'robot' to variable s a, b, c, d, e = s # Unpacking the string ...
-
Step-by-Step Execution: First Iteration (a = 0) b = 0 → d[0] = 0 b = 1 → d[0] = 1 (overwrites previous value) b = 2 → d[0] = 2 (overwrites...
-
Python 3.14 is here, bringing exciting new features, performance improvements, and enhanced security. As one of the most anticipated updat...
-
Step-by-step Execution: Define a Set: set1 = { 10 , 20 , 30 } set1 is a set containing {10, 20, 30}. Remove an Element: set2 = set1.remove...
-
What you'll learn Develop data engineering solutions with a minimal and essential subset of the Python language and the Linux environm...
-
📝 1. Swap Two Variables Without a Temp Variable a, b = 5 , 10 a, b = b, a print(a, b) Output: 10 5 📏 2. Check if a String is a Palindrom...
-
Python has one of the richest ecosystems of libraries and tools, making it a favorite for developers worldwide. GitHub is the ultimate tre...
-
Master data visualization with Matplotlib using this ultimate cheat sheet ! This PDF book provides 50 different plot types , covering ev...
-
Step-by-Step Execution Define outer() function Inside outer(), a variable x is initialized with the value 2. inner() is defined inside o...
Categories
100 Python Programs for Beginner
(96)
AI
(38)
Android
(24)
AngularJS
(1)
Assembly Language
(2)
aws
(17)
Azure
(7)
BI
(10)
book
(4)
Books
(188)
C
(77)
C#
(12)
C++
(83)
Course
(67)
Coursera
(247)
Cybersecurity
(25)
Data Analysis
(1)
Data Analytics
(2)
data management
(11)
Data Science
(142)
Data Strucures
(8)
Deep Learning
(21)
Django
(16)
Downloads
(3)
edx
(2)
Engineering
(14)
Euron
(29)
Excel
(13)
Factorial
(1)
Finance
(6)
flask
(3)
flutter
(1)
FPL
(17)
Generative AI
(9)
Google
(34)
Hadoop
(3)
HTML Quiz
(1)
HTML&CSS
(47)
IBM
(30)
IoT
(1)
IS
(25)
Java
(93)
Java quiz
(1)
Leet Code
(4)
Machine Learning
(76)
Meta
(22)
MICHIGAN
(5)
microsoft
(4)
Nvidia
(4)
Pandas
(4)
PHP
(20)
Projects
(29)
pyth
(1)
Python
(1004)
Python Coding Challenge
(447)
Python Quiz
(85)
Python Tips
(4)
Questions
(2)
R
(70)
React
(6)
Scripting
(1)
security
(3)
Selenium Webdriver
(4)
Software
(17)
SQL
(42)
UX Research
(1)
web application
(8)
Web development
(4)
web scraping
(2)