0% found this document useful (0 votes)
120 views7 pages

Lab Final (Spring - 2022) : CSE - 112 Structured Programming Language

This document contains the lab final submitted by Fhamida Alam Mahi of the CSE department at BUBT. It includes 8 problems solved in C programming language. The problems cover conditional statements, loops, arrays and checking properties of numbers. Most problems were accepted but problems 7 and 8 were rejected.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
120 views7 pages

Lab Final (Spring - 2022) : CSE - 112 Structured Programming Language

This document contains the lab final submitted by Fhamida Alam Mahi of the CSE department at BUBT. It includes 8 problems solved in C programming language. The problems cover conditional statements, loops, arrays and checking properties of numbers. Most problems were accepted but problems 7 and 8 were rejected.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 7

Lab Final (Spring – 2022)

Course Code : CSE – 112

Course Title : Structured Programming Language.

Submitted By Submitted To

Name : Fhamida Alam Mahi Name : Md. Mohsin Kabir


Intake : 49 Designation : Lecturer
Section : 07 Department of CSE
ID : 21225103300 Bangladesh University of Business and
Technology (BUBT)

Problem – 01: Wish You Eid Mubarak

Result: Accepted

Code:

#include<stdio.h>

int main(){

printf("Eid Mubarak 2022\n");

return 0;

}
Problem - 02: Good number

Result: Accepted

Code:
#include<stdio.h>

int main()

int N;

scanf("%d",&N);

if(N%2==0)

printf("Good\n");

else

printf("Bad\n");

return 0;

Problem – 03: Winning the Game

Result: Accepted

Code:
#include<stdio.h>

int main()

int a;
scanf("%d",&a);

if(a==0)

printf("Jahin\n");

else

printf("Tasir\n");

return 0;

Problem – 04: Division selection

Result: Accepted

Code:
#include<stdio.h>

int main()

int N;

scanf("%d",&N);

if(N>=47 && N<=49)

printf("junior division\n");

else if(N>=43 && N<=46)

{
printf("senior division\n");

else

printf("out of contest\n");

return 0;

Problem – 05: Climbing the mountain!

Result: Accepted

Code:
#include<stdio.h>

int main()

int A,B,C,D,tem;

scanf("%d%d%d%d",&A,&B,&C,&D);

if((A<B&&A<C&&A>D)||(A<B&&A<D&&A>C)||(A<C&&A<D&&A>B))

tem=A;

else if((B<A&&B<C&&B>D)||(B<A&&B<D&&B>C)||(B<C&&B<D&&B>A))

tem=B;

else if((C<A&&C<B&&C>D)||(C<A&&C<D&&C>B)||(C<B&&C<D&&C>A))

tem=C;

else

tem=D;

printf("%d\n",tem);
return 0;

Problem – 06: Counting mango

Result: Accepted

Code:
#include<stdio.h>

int main()

int N,i,sum=0;

scanf("%d",&N);

for(i=1;i<=N;i++)

sum+=i;

printf("%d\n",sum);

return 0;

Problem – 07: Birthday Party!

Result: Rejected

Code:
#include<stdio.h>

int main()

{
int N,i,sum=0;

scanf("%d",&N);

int ar[N];

for(i=0;i<N;i++)

scanf("%d",&ar[i]);

sum+=ar[i];

printf("%d\n",sum);

return 0;

Problem – 08: ANOTHER GOOD NUMBER

Result: Rejected

Code:
#include<stdio.h>

int main()

char N[100];

scanf("%s",N);

if(N%3==0)

printf("Good\n");

else

printf("Bad\n");

return 0;

You might also like