A

@albatross0706

Result

C
23 hours ago
#include <stdio.h> int main() { int Bengali, English, Physics, Math, Chemistry, Biology; printf("Enter numbers for six subjects \n"); scanf("%d %d %d %d %d %d", &Bengali, &English, &Physics, &Math, &Chemistry, &Biology); int lowMarks =

Factorial using while loop

C
6 days ago
#include <stdio.h> int main() { int n; printf("enter an integer\n"); int fact = 1; int i = 1; if(scanf("%d", &n) != 1) { printf("error");

Prime number using while loop

C
1 week ago
#include <stdio.h> int main() { int n; printf("enter the value of n: "); scanf("%d", &n); int i = 2; if(n <= 1) { printf("Not prime \n"); return 0;

To check it is a natural number or not

C
1 week ago
#include <stdio.h> int main() { int n; printf("enter the value of n: \n"); if (scanf("%d", &n) != 1) { printf("invalid."); } else if (n <= 0) { printf("error."); } else {

Calculating the square of a number using for loop

C
1 week ago
#include <stdio.h> int main() { int n; printf("enter values of n: "); if (scanf("%d\n", &n) != 1) { printf("invalid"); } else { int sum = 1;

Sum of natural numbers

C
1 week ago
#include <stdio.h> int main() { int n; printf("enter a number for n: "); scanf("%d", &n); if(n < 0) { printf("invalid"); } else { int sum = 0;

Printing numbers in do while method

C
1 week ago
#include <stdio.h> int main() { int n; printf("enter the value of n : "); scanf("%d \n", &n); int i = 0; do { printf("%d\n", i); i++;

Printing numbers in while loop method

C
1 week ago
#include <stdio.h> int main() { int n; printf("enter number: "); scanf("%d \n", &n); int i = 0; while(i <= n) { printf("%d \n", i); i++;

for loop ( Printing English letters )

C
1 week ago
#include <stdio.h> int main() { for( char ch= 'a'; ch <= 'z'; ch += 1) { printf("%c \n", ch); } return 0; }

for loop project

C
1 week ago
#include <stdio.h> int main() { for( int i = 0; i <= 10; i= i + 1) { printf("%d \n", i); } return 0; }

if else project

C
1 week ago
#include <stdio.h> int main() { //rintf("user is adult. \n"): printf("user is not adult. \n"); int myNum; printf("enter myNum: \n"); scanf("%d", &myNum); if(myNum < 0) { printf("negative.\n"); if(myNum % 2 == 0) {