how to print int in c
#include <stdio.h>
int main() {
int number;
printf("Enter an integer: ");
scanf("%d", &number);
printf("You entered: %d", number);
return 0;
}
how to print int in c
#include <stdio.h>
int main() {
int number;
printf("Enter an integer: ");
scanf("%d", &number);
printf("You entered: %d", number);
return 0;
}
prime number in c
#include<stdio.h>
void main(){
int num, i;
int cp = 1;
printf("Enter a number = ");
scanf("%d",&num);
if(num > 0){
for(i = 2; i < num; i++){
if(num % i == 0){
cp = 0;
}
}
if(cp == 1){
printf("%d is a prime number.", num);
}
else{
printf("%d isn't a prime number.", num);
}
}
}
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us