Programs_Algorithms_Flowcharts
Programs_Algorithms_Flowcharts
1. Start.
- Increment `i` by 1.
6. Stop.
#include <stdio.h>
int main() {
scanf("%d", &num);
return 0;
3. **Loop Through Numbers**: Multiply `factorial` by `i` for every iteration until `i > num`.
4. **Output the Result**: Print the value of `factorial` after the loop ends.
Count Vowels and Consonants
1. Start.
7. Stop.
#include <stdio.h>
#include <ctype.h>
int main() {
gets(str);
ptr = str;
if (isalpha(ch)) {
vowels++;
} else {
consonants++;
ptr++;
return 0;
1. Start.
7. Stop.
#include <stdio.h>
struct Student {
char name[50];
int age;
float total_marks;
};
int main() {
float average_marks;
// Input data for student1
scanf("%s", student1.name);
scanf("%d", &student1.age);
scanf("%f", &student1.total_marks);
scanf("%s", student2.name);
scanf("%d", &student2.age);
scanf("%f", &student2.total_marks);
student1.total_marks);
student2.total_marks);