Questions tagged [format]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
3 votes
4 answers

Problem with format codes

I'm trying to get cs50 IDE to print the size of char, double, float and int. This is what I wrote: #include <stdio.h> int main(void) { char c; double d; float f; int i; ...
  • 31
0 votes
1 answer

Style50 provides improvement suggestions I don't understand. What should I do with the code?

I wrote this piece of code. Generally it's just a declaration of four integers and the corresponding formulas. One line for each int: int q25 = cents/25 - cents%25/100; int q10 = (cents - q25*25)/10 ...
0 votes
2 answers

C data types and format specifiers

I was playing around with data types and format specifiers. Compiling the first snippet of code gives no errors but when I try to use unsigned shorts (or shorts in general) I get an error on line 12: ...
  • 21
0 votes
1 answer

PS1 greedy question regarding formatting of do/while conditions

I am a beginner and have worked through the greedy algorithm part of PS1 (prompt the user for the amount of change needed, round/convert it to cents, and determine how the change could be dispensed ...
0 votes
1 answer

Looking for a way to make a loop that rejects an input with any other hour format other than the one specified

Im having trouble creating a code on C that after letting the user input a date it determines if the date is in a valid 24 hour format, any help would be greatly appreciated. Here's my code. #include &...
0 votes
0 answers

Format IDE (Delete everything)

How can I format my Online IDE? I messed up with the aptitude and I have a lot of unnecesary file in my system. I don't care about to lost my code files.
0 votes
1 answer

pset4 Recover Unsupported file format

I know i've been asking a lot about this pset, but I assure I have done my research. My program for recover creates all of the files, but when I try to open them it says the file format is unsupported....