c program to write prime numbers up to given range and print in alphabets
Answers
Answered by
1
#include <stdio.h>
#include <math.h>
void main()
{
int num,m,n,d;
clrscr();
printf("Enter the Range Between m,n ");
scanf("%d%d", &m,&n);
for (num = m; num <= n; num++)
{
for(d = 2; d < num; d++)
{
if (num % d == 0)
break;
}
if (d == num)
printf("%d ", num);
}
getch();
}
#include <math.h>
void main()
{
int num,m,n,d;
clrscr();
printf("Enter the Range Between m,n ");
scanf("%d%d", &m,&n);
for (num = m; num <= n; num++)
{
for(d = 2; d < num; d++)
{
if (num % d == 0)
break;
}
if (d == num)
printf("%d ", num);
}
getch();
}
Answered by
0
Answer:
string = input("Please enter your own String : ")
char = input("Please enter your own Character : ")
count = 0
for i in range(len(string)):
if(string[i] == char):
count = count + 1
print("The total Number of Times ", char, " has Occurred = " , count)
Similar questions
Math,
7 months ago
English,
7 months ago
Social Sciences,
7 months ago
Biology,
1 year ago
Science,
1 year ago
English,
1 year ago
Social Sciences,
1 year ago