This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
You are going to write a program that automatically | |
prints the solution to the FizzBuzz game. | |
These are the rules of the FizzBuzz game: | |
--> Your program should print each number from 1 to 100 in turn and include number 100. | |
--> When the number is divisible by 3 then instead of printing the number it should print "Fizz". |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
int countchar(char str[]); | |
int main(){ | |
int i, lenOfStr, countWhiteSpace; | |
char str[50]; | |
printf("Enter the string: "); | |
gets(str); | |
lenOfStr = countchar(str); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
int sumOfArray(int arr[], int n); | |
int main(){ | |
int arr[10],i, n, sumOf; | |
printf("Enter the number of element: "); | |
scanf("%d",&n); | |
printf("Enter the elements of array: "); | |
for(i=0; i< n; i++){ |