বৃহস্পতিবার, ৩০ এপ্রিল, ২০১৫
Print Prime Number
লেবেলসমূহ:
C Programming
Leap Year count in C Programming
//Leap Year count in C Programming
#include <stdio.h>
int main()
{
int year;
printf("Enter a year to check if it is a leap year:");
scanf("%d", &year);
if ( year%400 == 0)
printf("%d is a leap year.", year);
else if ( year%100 == 0)
printf("%d is not a leap year.", year);
else if ( year%4 == 0 )
printf("%d is a leap year.", year);
else
printf("%d is not a leap year.", year);
return 0;
}
Result :
#include <stdio.h>
int main()
{
int year;
printf("Enter a year to check if it is a leap year:");
scanf("%d", &year);
if ( year%400 == 0)
printf("%d is a leap year.", year);
else if ( year%100 == 0)
printf("%d is not a leap year.", year);
else if ( year%4 == 0 )
printf("%d is a leap year.", year);
else
printf("%d is not a leap year.", year);
return 0;
}
Result :
লেবেলসমূহ:
C Programming
রবিবার, ২৬ এপ্রিল, ২০১৫
A simple Calculator with C Programming
// Developed By Muhammad Rakib Hasan
// A simple Calculator with C Programming
#include<stdio.h>
int add(int num1,int num2);
float division(int num1,int num2);
int multiplication(int num1,int num2);
int substruction(int num1,int num2);
int main()
{
int a,b,output,subs;
float div,multi;
char ch;
printf("Please Enter +,-,* or / :");
scanf("%c",&ch);
if(ch=='+'){
printf("Please Enter First Number:");
scanf("%d",&a);
printf("Please Enter Second Number:");
scanf("%d",&b);
output=add(a,b);
printf("The sum of %d and %d is : %d\n",a,b,output);
}
else if(ch=='-'){
printf("Please Enter First Number:");
scanf("%d",&a);
printf("Please Enter Second Number:");
scanf("%d",&b);
subs=substruction(a,b);
printf("The substruction Value of %d and %d is: %d",a,b,subs);
}
else if(ch=='*'){
printf("Please Enter First Number:");
scanf("%d",&a);
printf("Please Enter Second Number:");
scanf("%d",&b);
multi=multiplication(a,b);
printf("The Multiplication Value of %d and %d is : %f",a,b,multi);
}
else if(ch=='/'){
printf("Please Enter First Number:");
scanf("%d",&a);
printf("Please Enter Second Number:");
scanf("%d",&b);
div=division(a,b);
printf("The Division Value of %d and %d is: %f",a,b,div);
}
else{
printf("Invalid input");
}
return 0;
}
int add(int a,int b){
int sum;
sum=a+b;
return sum;
}
int substruction(int a,int b){
int subs;
subs=a-b;
return subs;
}
int multiplication(int a,int b){
int multi;
multi=a*b;
return multi;
}
float division(int a,int b){
float div;
div=(float)a/b;
return div;
}
Result :
// A simple Calculator with C Programming
#include<stdio.h>
int add(int num1,int num2);
float division(int num1,int num2);
int multiplication(int num1,int num2);
int substruction(int num1,int num2);
int main()
{
int a,b,output,subs;
float div,multi;
char ch;
printf("Please Enter +,-,* or / :");
scanf("%c",&ch);
if(ch=='+'){
printf("Please Enter First Number:");
scanf("%d",&a);
printf("Please Enter Second Number:");
scanf("%d",&b);
output=add(a,b);
printf("The sum of %d and %d is : %d\n",a,b,output);
}
else if(ch=='-'){
printf("Please Enter First Number:");
scanf("%d",&a);
printf("Please Enter Second Number:");
scanf("%d",&b);
subs=substruction(a,b);
printf("The substruction Value of %d and %d is: %d",a,b,subs);
}
else if(ch=='*'){
printf("Please Enter First Number:");
scanf("%d",&a);
printf("Please Enter Second Number:");
scanf("%d",&b);
multi=multiplication(a,b);
printf("The Multiplication Value of %d and %d is : %f",a,b,multi);
}
else if(ch=='/'){
printf("Please Enter First Number:");
scanf("%d",&a);
printf("Please Enter Second Number:");
scanf("%d",&b);
div=division(a,b);
printf("The Division Value of %d and %d is: %f",a,b,div);
}
else{
printf("Invalid input");
}
return 0;
}
int add(int a,int b){
int sum;
sum=a+b;
return sum;
}
int substruction(int a,int b){
int subs;
subs=a-b;
return subs;
}
int multiplication(int a,int b){
int multi;
multi=a*b;
return multi;
}
float division(int a,int b){
float div;
div=(float)a/b;
return div;
}
Result :
লেবেলসমূহ:
C Programming
শুক্রবার, ২৪ এপ্রিল, ২০১৫
Finding Factorial in C program
লেবেলসমূহ:
C Programming
Simple calculator using switch...case statement in C programming.
// Simple calculator using switch...case statement in C programming.
# include <stdio.h>
int main()
{
char o;
float a,b;
printf("Enter operator either + or - or * or divide : ");
scanf("%c",&o);
printf("Enter First Value: ");
scanf("%f",&a);
printf("Enter Second Value: ");
scanf("%f",&b);
switch(o) {
case '+':
printf("%.1f + %.1f = %.1f",a, b, a+b);
break;
case '-':
printf("%.1f - %.1f = %.1f",a, b, a-b);
break;
case '*':
printf("%.1f * %.1f = %.1f",a, b, a*b);
break;
case '/':
printf("%.1f / %.1f = %.1f",a, b, a/b);
break;
default:
printf("Error! operator is not correct");
break;
}
return 0;
}
Output :
# include <stdio.h>
int main()
{
char o;
float a,b;
printf("Enter operator either + or - or * or divide : ");
scanf("%c",&o);
printf("Enter First Value: ");
scanf("%f",&a);
printf("Enter Second Value: ");
scanf("%f",&b);
switch(o) {
case '+':
printf("%.1f + %.1f = %.1f",a, b, a+b);
break;
case '-':
printf("%.1f - %.1f = %.1f",a, b, a-b);
break;
case '*':
printf("%.1f * %.1f = %.1f",a, b, a*b);
break;
case '/':
printf("%.1f / %.1f = %.1f",a, b, a/b);
break;
default:
printf("Error! operator is not correct");
break;
}
return 0;
}
Output :
লেবেলসমূহ:
C Programming
Finding Prime numbers with c programming
//Finding Prime numbers
#include<stdio.h>
int main(){
int n, i = 3, count, c;
printf("Enter the number of prime numbers required:");
scanf("%d",&n);
if ( n >= 1 ) {
printf("First %d prime numbers are :\n",n);
}
for ( count = 2 ; count <= n ; ){
for ( c = 2 ; c <= i - 1 ; c++ ){
if ( i%c == 0 )
break;
}
if ( c == i ){
printf("%d,",i);
count++;
}
i++;
}
return 0;
}
Result :
লেবেলসমূহ:
C Programming
Find LCM of two positive integers with c Programming
//Find LCM of two positive integers with c Programming
#include <stdio.h>
int main()
{
int i, j, k;
printf("Enter First positive integers: ");
scanf("%d", &i);
printf("Enter First positive integers: ");
scanf("%d", &j);
k=(i>j) ? i : j;
while(1)
{
if(k%i==0 && k%j==0)
{
printf("LCM of %d and %d is : %d", i, j,k);
break;
}
++k;
}
return 0;
}
Result :
#include <stdio.h>
int main()
{
int i, j, k;
printf("Enter First positive integers: ");
scanf("%d", &i);
printf("Enter First positive integers: ");
scanf("%d", &j);
k=(i>j) ? i : j;
while(1)
{
if(k%i==0 && k%j==0)
{
printf("LCM of %d and %d is : %d", i, j,k);
break;
}
++k;
}
return 0;
}
Result :
লেবেলসমূহ:
C Programming
Find Highest Common Factor with C Program .
//greatest common divisor
//Highest Common Factor
// Find Highest Common Factor with C Program .
#include<stdio.h>
int main(){
int i,j,k,gcd;
printf("Please Enter First Number:");
scanf("%d",&j);
printf("Please Enter Second Number:");
scanf("%d",&k);
for(i=1;i<=j||i<=k;++i){
if(j%i==0&&k%i==0){
gcd=i;
}
}
printf("\nThe greatest common divisor of %d and %d is : %d\n",j,k,gcd);
return 0;
}
Result :
//Highest Common Factor
// Find Highest Common Factor with C Program .
#include<stdio.h>
int main(){
int i,j,k,gcd;
printf("Please Enter First Number:");
scanf("%d",&j);
printf("Please Enter Second Number:");
scanf("%d",&k);
for(i=1;i<=j||i<=k;++i){
if(j%i==0&&k%i==0){
gcd=i;
}
}
printf("\nThe greatest common divisor of %d and %d is : %d\n",j,k,gcd);
return 0;
}
Result :
লেবেলসমূহ:
C Programming
বুধবার, ২২ এপ্রিল, ২০১৫
Ascending Number Print with C Programming
লেবেলসমূহ:
C Programming
Descending Decimal Number
লেবেলসমূহ:
C Programming
Print Descending Star using C Programming.
লেবেলসমূহ:
C Programming
সোমবার, ২০ এপ্রিল, ২০১৫
Star print
লেবেলসমূহ:
C Programming
Addition value of Even numbers in given range
//Developed By Muhammad Rakib Hasan 2279
//Addition value of Even numbers in given range
#include<stdio.h>
int main(){
int s,e,sum=0;
printf("Enter a starting value: ");
scanf("%d",&s);
printf("Enter a ending value: ");
scanf("%d",&e);
printf("Addition value of Even numbers in given range are: \n\n");
for(s;s<e;s++){
if(s%2==0){
sum=sum+s;
}
}
printf("%d",sum);
return 0;
}
Result :
//Addition value of Even numbers in given range
#include<stdio.h>
int main(){
int s,e,sum=0;
printf("Enter a starting value: ");
scanf("%d",&s);
printf("Enter a ending value: ");
scanf("%d",&e);
printf("Addition value of Even numbers in given range are: \n\n");
for(s;s<e;s++){
if(s%2==0){
sum=sum+s;
}
}
printf("%d",sum);
return 0;
}
Result :
লেবেলসমূহ:
C Programming
Lower And Upper Case
//Developed By Muhammad Rakib Hasan 2279
//Lower And Upper Case
#include<stdio.h>
int main(){
char a;
printf("Please Enter a Case :");
scanf("%c",&a);
if(a>='A'&& a<='Z'){
printf("%c is Upper case. ",a);
}
else if(a>='a'&& a<='z'){
printf("%c is Lower case. ",a);
}
else{
printf("Please Enter a Valid input ! ");
}
return 0;
}
//Lower And Upper Case
#include<stdio.h>
int main(){
char a;
printf("Please Enter a Case :");
scanf("%c",&a);
if(a>='A'&& a<='Z'){
printf("%c is Upper case. ",a);
}
else if(a>='a'&& a<='z'){
printf("%c is Lower case. ",a);
}
else{
printf("Please Enter a Valid input ! ");
}
return 0;
}
Result :
লেবেলসমূহ:
C Programming
Mark Sheet Using C Language
//Developed By Muhammad Rakib Hasan 2279
//Mark sheet
#include<stdio.h>
int main(){
int marks;
printf("Enter A Valied Marks: ");
scanf("%d",&marks);
if(marks>=80&&marks<=100){
printf("Your Grade Point Is A+");
}
else if(marks>=70&&marks<=79){
printf("Your Grade Point Is A");
}
else if(marks>=60&&marks<=69){
printf("Your Grade Point Is A-");
}
else if(marks>=50&&marks<=59){
printf("Your Grade Point Is B");
}
else if(marks>=40&&marks<=49){
printf("Your Grade Point Is C");
}
else if(marks>100){
printf("Please Enter Between 0-100, Valid Marks");
}
else{
printf("Your Grade is F");
}
}
Result:
//Mark sheet
#include<stdio.h>
int main(){
int marks;
printf("Enter A Valied Marks: ");
scanf("%d",&marks);
if(marks>=80&&marks<=100){
printf("Your Grade Point Is A+");
}
else if(marks>=70&&marks<=79){
printf("Your Grade Point Is A");
}
else if(marks>=60&&marks<=69){
printf("Your Grade Point Is A-");
}
else if(marks>=50&&marks<=59){
printf("Your Grade Point Is B");
}
else if(marks>=40&&marks<=49){
printf("Your Grade Point Is C");
}
else if(marks>100){
printf("Please Enter Between 0-100, Valid Marks");
}
else{
printf("Your Grade is F");
}
}
Result:
লেবেলসমূহ:
C Programming
রবিবার, ১৯ এপ্রিল, ২০১৫
Odd and Even Number identify using and operator
লেবেলসমূহ:
C Programming
শুক্রবার, ১৭ এপ্রিল, ২০১৫
Age Calculation using if else if statement
Please write down a code where you can input your "age" if your age is between (0 to14) then show "You are a child" if your age is between (15 to 35) then show "You are a young" if your age is between then (36 to 50) then show "You are a middle aged" if your age is greater then 50 then show "You are a old".
Assalamolalikum dear Mentor and friends,
Now i want to share you a concept on this problem in C Programming ..
01.Firstly i have to need one variable declaration (int age;).
02.After variable declaration ,i need the code by which can i input a starting and a ending value (printf("Please Enter you Age : ");
scanf("%d", &age);)
03.Then it is necessary to me the logic implementation "(if(age>=0 && age<=14){
printf("You are a child");
}")
one by one this logic are applied .......
04.Finally show the output result ..
Here the code and Screenshot
Solution of Above problem :
//Developed By Muhammad Rakib Hasan
// Age Calculation using if else if
#include <stdio.h>
int main(){
int age;
printf("Please Enter you Age : ");
scanf("%d", &age);
if(age>=0 && age<=14){
printf("You are a child");
}
else if(age>=15 && age<=35){
printf("You are a young");
}
else if(age>=36 && age<=50){
printf("You are a middle aged");
}
else{
printf("You are old");
}
return 0;
}
Result:
লেবেলসমূহ:
C Programming
Find largest number using if...else statement with and Operator
//Developed By Muhammad Rakib Hasan
// Find largest number using if...else statement with and operator
#include <stdio.h>
int main(){
int a, b, c;
printf("Enter the First Number : ");
scanf("%d", &a);
printf("Enter the second Number : ");
scanf("%d", &b);
printf("Enter The Third Number : ");
scanf("%d", &c);
if(a>=b && a>=c)
printf("Largest number is: %d", a);
else if(b>=a && b>=c)
printf("Largest number is: %d", b);
else
printf("Largest number is: %d", c);
return 0;
}
// Find largest number using if...else statement with and operator
#include <stdio.h>
int main(){
int a, b, c;
printf("Enter the First Number : ");
scanf("%d", &a);
printf("Enter the second Number : ");
scanf("%d", &b);
printf("Enter The Third Number : ");
scanf("%d", &c);
if(a>=b && a>=c)
printf("Largest number is: %d", a);
else if(b>=a && b>=c)
printf("Largest number is: %d", b);
else
printf("Largest number is: %d", c);
return 0;
}
Result :
লেবেলসমূহ:
C Programming
Find largest number using if..else statement in C programming
//Developed By Muhammad Rakib Hasan
// Find largest number using if..else statement in C programming
#include <stdio.h>
int main(){
int a, b, c;
printf("Enter the First Number : ");
scanf("%d", &a);
printf("Enter the second Number : ");
scanf("%d", &b);
printf("Enter The Third Number : ");
scanf("%d", &c);
if (a>=b)
{
if(a>=c)
printf("Largest number is: %d",a);
else
printf("Largest number is: %d",c);
}
else
{
if(b>=c)
printf("Largest number is: %d",b);
else
printf("Largest number is: %d",c);
}
return 0;
}
Result :
লেবেলসমূহ:
C Programming
Find largest number using if statement only in C Programming
//Developed By Muhammad Rakib Hasan
//Find largest number using if statement only in C Programming
#include <stdio.h>
int main(){
int a, b, c;
printf("Enter the First Number : ");
scanf("%d", &a);
printf("Enter the second Number : ");
scanf("%d", &b);
printf("Enter The Third Number : ");
scanf("%d", &c);
if(a>=b && a>=c)
printf("Largest number : %d", a);
if(b>=a && b>=c)
printf("Largest number : %d", b);
if(c>=a && c>=b)
printf("Largest number is : %d", c);
return 0;
}
//Find largest number using if statement only in C Programming
#include <stdio.h>
int main(){
int a, b, c;
printf("Enter the First Number : ");
scanf("%d", &a);
printf("Enter the second Number : ");
scanf("%d", &b);
printf("Enter The Third Number : ");
scanf("%d", &c);
if(a>=b && a>=c)
printf("Largest number : %d", a);
if(b>=a && b>=c)
printf("Largest number : %d", b);
if(c>=a && c>=b)
printf("Largest number is : %d", c);
return 0;
}
Result :
লেবেলসমূহ:
C Programming
Even and Odd separation By C Programming
/*Now i want to share you a concept how to find odd and even number which you have input as a starting and ending value in C Programming ..
01.Firstly i have to need three integer variable declaration (int minimum,maximum,input_number;).
02.After variable declaration ,i need the code by which can i input a starting and a ending value (printf("Enter Your Starting Number: ");
scanf("%d",&minimum);
printf("Enter Your Ending Number: ");
scanf("%d",&maximum);)
03.Then it is necessary to me the logic implementation "(for(input_number=minimum;input_number<=maximum;input_number++)")
04.After logic implementation it have to need another condition by which the program compare this to input range which one is even(" if(input_number%2==0)") and which is odd("if(input_number%2!=0)").
05.Finally show the output result ..
Here the code and Screenshot
*/
//Developed By Muhammad Rakib Hasan.
//Even and Odd separation By C Programming
#include<stdio.h>
int main(){
int minimum,maximum,input_number;
printf("Enter Your Starting Number: ");
scanf("%d",&minimum);
printf("Enter Your Ending Number: ");
scanf("%d",&maximum);
printf("Even Number of Given Range %d to %d is :",minimum,maximum);
for(input_number=minimum;input_number<=maximum;input_number++)
if(input_number%2==0)
printf("\t%d",input_number);
printf("\n\nOdd Number of Given Range %d to %d is :",minimum,maximum);
for(input_number=minimum;input_number<=maximum;input_number++)
if(input_number%2!=0)
printf("\t%d",input_number);
return 0;
}
01.Firstly i have to need three integer variable declaration (int minimum,maximum,input_number;).
02.After variable declaration ,i need the code by which can i input a starting and a ending value (printf("Enter Your Starting Number: ");
scanf("%d",&minimum);
printf("Enter Your Ending Number: ");
scanf("%d",&maximum);)
03.Then it is necessary to me the logic implementation "(for(input_number=minimum;input_number<=maximum;input_number++)")
04.After logic implementation it have to need another condition by which the program compare this to input range which one is even(" if(input_number%2==0)") and which is odd("if(input_number%2!=0)").
05.Finally show the output result ..
Here the code and Screenshot
*/
//Developed By Muhammad Rakib Hasan.
//Even and Odd separation By C Programming
#include<stdio.h>
int main(){
int minimum,maximum,input_number;
printf("Enter Your Starting Number: ");
scanf("%d",&minimum);
printf("Enter Your Ending Number: ");
scanf("%d",&maximum);
printf("Even Number of Given Range %d to %d is :",minimum,maximum);
for(input_number=minimum;input_number<=maximum;input_number++)
if(input_number%2==0)
printf("\t%d",input_number);
printf("\n\nOdd Number of Given Range %d to %d is :",minimum,maximum);
for(input_number=minimum;input_number<=maximum;input_number++)
if(input_number%2!=0)
printf("\t%d",input_number);
return 0;
}
লেবেলসমূহ:
C Programming
বৃহস্পতিবার, ১৬ এপ্রিল, ২০১৫
Evaluate Large Number among three input value Using And Operator .
//Developed By 2279 Muhammad Rakib Hasan.
//CTST2354
//Evaluate Large Number among three input value using and operator
#include<stdio.h>
int main(){
int a,b,c;
printf("Enter The 3 Value:");
scanf("%d%d%d",&a,&b,&c);
if(a>b&&a>c){
printf("%d Is Gratter Number",a);
}
if(b>c&&b>a){
printf("%d Is Gratter Number",b);
}
else{
printf("%d Is Gratter Number",c);
}
return 0;
}
Result:
//CTST2354
//Evaluate Large Number among three input value using and operator
#include<stdio.h>
int main(){
int a,b,c;
printf("Enter The 3 Value:");
scanf("%d%d%d",&a,&b,&c);
if(a>b&&a>c){
printf("%d Is Gratter Number",a);
}
if(b>c&&b>a){
printf("%d Is Gratter Number",b);
}
else{
printf("%d Is Gratter Number",c);
}
return 0;
}
Result:
লেবেলসমূহ:
C Programming
Evaluate Large Number Among Three Input Value
//Developed By 2279 Muhammad Rakib Hasan.
//CTST2354
//Evaluate Large Number among three input value
#include<stdio.h>
int main(){
int a,b,c;
printf("Enter The 3 Value:");
scanf("%d%d%d",&a,&b,&c);
if(a>b){
if(a>c){
printf("%d is Largest Number",a);
}
else{
printf("%d is Largest Number",c);
}
}
else{
if(b>c){
printf("%d Is Largest Number",b);
}
else{
printf("%d is Largest Number",c);
}
}
return 0;
}
Result :
//CTST2354
//Evaluate Large Number among three input value
#include<stdio.h>
int main(){
int a,b,c;
printf("Enter The 3 Value:");
scanf("%d%d%d",&a,&b,&c);
if(a>b){
if(a>c){
printf("%d is Largest Number",a);
}
else{
printf("%d is Largest Number",c);
}
}
else{
if(b>c){
printf("%d Is Largest Number",b);
}
else{
printf("%d is Largest Number",c);
}
}
return 0;
}
Result :
লেবেলসমূহ:
C Programming
Evaluate Leap Year with C Programming
//Developed By 2279 Muhammad Rakib Hasan.
//CTST2354
//Evaluate Leap Year with C Programming
#include<stdio.h>
int main(){
int year;
printf("Please Enter A Valid Year:");
scanf("%d",&year);
if(year%4==0){
printf("%d is a Leap Year.",year);
}
else{
printf("%d Is Not a Leap Year.",year);
}
return 0;
}
Result :
//CTST2354
//Evaluate Leap Year with C Programming
#include<stdio.h>
int main(){
int year;
printf("Please Enter A Valid Year:");
scanf("%d",&year);
if(year%4==0){
printf("%d is a Leap Year.",year);
}
else{
printf("%d Is Not a Leap Year.",year);
}
return 0;
}
Result :
লেবেলসমূহ:
C Programming
Evaluate Odd & Even with C Programming ..
//Developed By 2279 Muhammad Rakib Hasan.
//CTST2354
//Calculate the Odd And Even Number
#include<stdio.h>
int main(){
int a;
printf("\t\t\n\nEnter a Value of A: ");
scanf("%d",&a);
if (a%2!=1){
printf("A is Even Number !");
}
else{
printf("A is Odd Number !");
}
return 0;
printf(".....................End......................\n\n\n\n\n\n\n\n");
}
//CTST2354
//Calculate the Odd And Even Number
#include<stdio.h>
int main(){
int a;
printf("\t\t\n\nEnter a Value of A: ");
scanf("%d",&a);
if (a%2!=1){
printf("A is Even Number !");
}
else{
printf("A is Odd Number !");
}
return 0;
printf(".....................End......................\n\n\n\n\n\n\n\n");
}
Result :
লেবেলসমূহ:
C Programming
Evaluate IF Else Condition with case ..
//Developed By 2279 Muhammad Rakib Hasan.
//CTST2354
//Evaluate IF Else Condition
#include<stdio.h>
int main(){
char rain_status;
printf("\n\n\n Please Enter Present Rain Status,Where Y is for Rain And N for not :",rain_status);
scanf("%c",&rain_status);
if(rain_status=='y'){
printf("\n\n\n You Have to Open Your Umbrella \n\n\n\n");
}
else if(rain_status=='n'){
printf("\n\n\n You Have Not Open Your Umbrella \n\n\n\n");
}
else{
printf("\n\n\n Please Enter valid Case");
}
printf("\n\n\n\n\n\n\n\n.................End.....................\n\n\n\n\n\n\n\n");
return 0;
}
Result :
//CTST2354
//Evaluate IF Else Condition
#include<stdio.h>
int main(){
char rain_status;
printf("\n\n\n Please Enter Present Rain Status,Where Y is for Rain And N for not :",rain_status);
scanf("%c",&rain_status);
if(rain_status=='y'){
printf("\n\n\n You Have to Open Your Umbrella \n\n\n\n");
}
else if(rain_status=='n'){
printf("\n\n\n You Have Not Open Your Umbrella \n\n\n\n");
}
else{
printf("\n\n\n Please Enter valid Case");
}
printf("\n\n\n\n\n\n\n\n.................End.....................\n\n\n\n\n\n\n\n");
return 0;
}
Result :
লেবেলসমূহ:
C Programming
Evaluate IF Else Condition with real life Example ...
//Developed By 2279 Muhammad Rakib Hasan.
//CTST2354
//Evaluate IF Else Condition
#include<stdio.h>
int main(){
int rain_status;
printf("Please Enter Present Rain Status(Where 1 is for Rain And Other is not ):%d",rain_status);
scanf("%d",&rain_status);
if(rain_status==1){
printf("You Have to Open Your Umbrella \n\n\n\n");
}
else{
printf("You Have Not Open Your Umbrella \n\n\n\n");
}
printf("\n\n\n\n\n\n\n\n.................End.....................");
}
Result :
//CTST2354
//Evaluate IF Else Condition
#include<stdio.h>
int main(){
int rain_status;
printf("Please Enter Present Rain Status(Where 1 is for Rain And Other is not ):%d",rain_status);
scanf("%d",&rain_status);
if(rain_status==1){
printf("You Have to Open Your Umbrella \n\n\n\n");
}
else{
printf("You Have Not Open Your Umbrella \n\n\n\n");
}
printf("\n\n\n\n\n\n\n\n.................End.....................");
}
Result :
লেবেলসমূহ:
C Programming
Area And Circumference in a Circle with C Programming
//2279 Muhammad Rakib Hasan.
//CTST2354
#include<stdio.h>
int main(){
float radious,area,circumference,pi;
pi=3.141593;
printf(" \nPlease Enter The circle Radious : ");
scanf("%f",&radious);
area=pi*radious*radious;
printf(" \nThe Area of The Circle is : %f\n",area);
printf(" \nThe Circumference of The Circle is : %f\n\n\n\n\n",circumference);
printf("......................End.....................\n\n\n\n\n");
return 0;
}
Result :
লেবেলসমূহ:
C Programming
বুধবার, ১৫ এপ্রিল, ২০১৫
How to solve the desire loan in C reprogramming ..
#include<stdio.h>
int main(){
float bank_loan,interest_amount,interest,total_paid;
printf("\n Enter the Loan amount : ");
scanf("%f",&bank_loan);
printf("\n Enter the Interest amount : ");
scanf("%f",&interest_amount);
interest=bank_loan*interest_amount/100;
total_paid=bank_loan+interest;
printf("\n Total interest for bank Loan %f\n",interest);
printf("\n Total Paid to bank with interest %f\n\n",total_paid);
printf("..............................................\n\n\n");
return 0;
}
Out put ...............
লেবেলসমূহ:
C Programming
এতে সদস্যতা:
পোস্টগুলি (Atom)