void main
{
int number;
char quit
do
{
printf("Enter number:\n");
if(scant("%d",&number) !=1 && scanf("%c", &quit))
{
printf("Invalid\n");
Type: Posts; User: Aliano
void main
{
int number;
char quit
do
{
printf("Enter number:\n");
if(scant("%d",&number) !=1 && scanf("%c", &quit))
{
printf("Invalid\n");
#include<stdio.h>
void main
{
int i;
int marks[10];
for( i=0; i<10; i++)
{
printf("\n %d",i+1);
#include <stdio.h>
#include <stdlib.h>
struct node
int no;
struct node *next;
};
#include<stdio.h>
int calcAbvAvg(int marks[10], int avg)
{
int students = 0;
int i;
for(i=0;i<10;i++)
{
if(marks[i] > avg)
i didnt get what you mean by "
Now, instead of printing something every time, set a flag and print it once at the end."
i hate linked list -_-
http://i.imgur.com/dtodncW.png
true true is true? o.O
it works while(ch !='q' && ch != 'Q');
void create(struct node **head)
{
int c;
char ch;
struct node *temp, *rear;
do
{
printf("Enter Student Score:");
scanf("%d", &c);
#include <stdio.h>
#include <stdlib.h>
//Linked List data structure declaration
struct node {
int num;
struct node *next;
};
#include <stdio.h>#include <stdlib.h>
//Linked List data structure declaration
struct node
{
int num;
struct node *next;
};
In my first post coding linked list print as the order it is entered! i want to print like this. 0 to 50 scores as valid and rest as invalid :|
Linked-List of valid scores 0->30->27->43-> END OF...
In the following code, it required for users to enter scores between 0 -50 which should print valid link list and if values beyond the range are entered, should be flagged as invalid and print...
#include <stdio.h>#include <stdlib.h>
//Linked List data structure declaration
struct node
{
int num;
struct node *next;
};
In the following code, it required for users to enter scores between 0 -50 which should print valid link list and if values beyond the range are entered, should be flagged as invalid and print...
i want to write a function for this program that will count no of students who are above and below average!
what will be the formula to get it?
thanks that works! :biggrin:
how do i print the error message "Character is Invalid" if a user enter something other then numbers?
Which method i should use?
//Program that reads 10 students marks and display the average, the maximum and the minimum marks.
#include <Stdio.h>
main()
{
// Local Declarations
int marks[10];
int i; ...