I don't know why my code is failing after building, actually i know the char statements are wrong can anyone tell me how i can fix the char statements and make them correct, all i need to do is initialize a single letter using char

#include <stdio.h>

int main() {
// initialize variables needed for user inputs and calculations
	int grade1 = 0;
	int grade2 = 0;
	int grade3 = 0;
	int grade4 = 0;
	int midterm = 0;
	int attendence = 0;
	int totalPoints = 0;
	int gradepercentage = 0;
	int total = 0;
	char grade1 = 'A';    // this is where it fails
	char grade2 = 'B';
	char grade3 = 'C';
	char grade4 = 'D';
7 Years
Discussion Span
Last Post by geoffy0404

> Everything posted is fine.

You sure?

int grade1 = 0;
	char grade1 = 'A';    // this is where it fails

i actually found that out right after i posted this , thats why i had it as solved but thank you for pointing it out.

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.