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
-
Explanation: List Initialization: colors = ["Red", "Yellow", "Orange"] A list named colors is created wit...
-
Introduction to Data Science in Python: Course Review and Insights Python has become one of the most powerful and popular programming lang...
-
Execution Flow: The first if(True) condition is True , so the code inside it runs. It prints "0" . Inside the first if bloc...
-
Step-by-Step Breakdown: Importing the array module import array as arr The array module is a built-in Python module that provides...
-
Execution: Function Call: calc( 5 , 5 , 1 , 8 ) args receives (5, 5, 1, 8), which is a tuple. Step 1: Count the Number of Argume...
-
Key Points: Local Scope of name The variable name is defined inside the function set_name(). This means name exists only within the...
-
Explanation of the Code: Creating an Empty Dictionary: personsAges = dict () This initializes an empty dictionary named personsAges....
-
Explanation: number = 7: Assigns the value 7 to the variable number. if(number == 7): Checks if number is equal to 7. This condition is...
-
Step-by-step Execution: Outer Loop ( for i in range(0, 1) ) : range(0, 1) generates the sequence [0], so the loop runs once with i = 0...
-
Introduction In today’s AI-driven world, developing a machine learning (ML) model is only the first step. The real challenge lies in deplo...
Categories
100 Python Programs for Beginner
(96)
AI
(39)
Android
(24)
AngularJS
(1)
Api
(2)
Assembly Language
(2)
aws
(17)
Azure
(7)
BI
(10)
book
(4)
Books
(197)
C
(77)
C#
(12)
C++
(83)
Course
(67)
Coursera
(249)
Cybersecurity
(25)
Data Analysis
(2)
Data Analytics
(2)
data management
(11)
Data Science
(148)
Data Strucures
(8)
Deep Learning
(21)
Django
(16)
Downloads
(3)
edx
(2)
Engineering
(14)
Euron
(29)
Events
(6)
Excel
(13)
Factorial
(1)
Finance
(6)
flask
(3)
flutter
(1)
FPL
(17)
Generative AI
(11)
Google
(36)
Hadoop
(3)
HTML Quiz
(1)
HTML&CSS
(47)
IBM
(30)
IoT
(1)
IS
(25)
Java
(93)
Java quiz
(1)
Leet Code
(4)
Machine Learning
(85)
Meta
(22)
MICHIGAN
(5)
microsoft
(4)
Nvidia
(4)
Pandas
(4)
PHP
(20)
Projects
(29)
pyth
(1)
Python
(1027)
Python Coding Challenge
(454)
Python Quiz
(110)
Python Tips
(5)
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)