Posts

Showing posts from October, 2025

factorial of given number using for loop

#include int main() { int i,n,fact=1; printf("enter a number:"); scanf("%d",&n); for(i=1;i

bluetooth code for stm32

/* USER CODE BEGIN Header */ /** ****************************************************************************** * @file : main.c * @brief : Main program body ****************************************************************************** * @attention * * Copyright (c) 2025 STMicroelectronics. * All rights reserved. * * This software is licensed under terms that can be found in the LICENSE file * in the root directory of this software component. * If no LICENSE file comes with this software, it is provided AS-IS. * ****************************************************************************** */ /* USER CODE END Header */ /* Includes ------------------------------------------------------------------*/ #include "main.h" /* Private includes ----------------------------------------------------------*/ /* USER CODE BEGIN Includes */ /* USER CODE END Includes */ /* Private typedef ---------------------------------------------------...

create a game using for loop in c

#include int main() { int guess,secret; secret=6; // Allow 5 guesses using a for loop for(int i = 1; i

write a program for n even numbers using for loop in c?

#include int main() { int i,f; printf("enter even numbers end up to:"); scanf("%d",&f); printf("Even numbers are"); for(i=0;i

write a program for n number of table using for loop in c

#include int main() { int i,n,f; printf("enter table end:"); scanf("%d",&f); printf("enter table number:"); scanf("%d",&n); for(i=1;i