-
Program to print all prime numbers btw 1 to 100
C Program to print all prime numbers btw 1 to 100..pls explain the program: What is if(p)??{geshibot language="cpp"}#include #include int main() { int num,n,div,p; printf("Enter any number: "); scanf("%d", &num); for(n=2; n
-
What change is required in the following program so that its output becomes 3,6,11,20,37,......1034?
{geshibot language="c"}#include #include int main() { int a=1,r=2,i; for (i=0;i
-
Function syntax
string abc = showData()["Hello"]; can somebody explain what is use of ["Hello"] after function call?
-
Print number of distinct characters in a string.
How do I implement a C program that reads a string and prints a table with the number of occurrences of each character in the string. Ex: Rubber. r = 2, u = 1, b = 2, e = 1.
-
-
-
C program to count numbers of positive and negative numbers
Write a C program using arrays to count the numbers of positive and negative numbers which accepts the inputs as "size of the array" & "elements of the array" and outputs as "number of negative numbers in an array are" & "numbers of positive numbers in an array are" ?