Posts
 
Reputation
Joined
Last Seen
Strength to Increase Rep
+0
Strength to Decrease Rep
-0
50% Quality Score
Upvotes Received
1
Posts with Upvotes
1
Upvoting Members
1
Downvotes Received
1
Posts with Downvotes
1
Downvoting Members
1
1 Commented Post
0 Endorsements
~2K People Reached
Favorite Forums
Favorite Tags
Member Avatar for alex1050

[CODE]int main() { // stating my primivative data types and variables float num1,result; char symbol, choice; printf("Calculator Is ON\n"); do{ result=0.0; //assign 0.0 to result printf("Result=%.1f\n", result); scanf(" %c",&symbol); while((symbol!='r') && (symbol!='R')) { scanf(" %f",&num1); switch(symbol) { case'+': result=result+num1; printf("Result = %.1f\n",result); break; case'-': result=result-num1; printf("Result = %.1f\n",result); break; case'*': …

Member Avatar for alex1050
0
105
Member Avatar for alex1050

I need help understanding the do-while loop in this code. Im confused in how this do- while works because what i understand is the statement is executed then the expression is evaluated if nonzero and executes whats in while(). But its a loop so for example if i type Jack …

Member Avatar for Aia
0
193
Member Avatar for alex1050

[CODE]I'm having trouble calculating the right interest expense. The solution for interest expense is 2294.48 but cant get it. #include <stdio.h> #include <stdlib.h> #include <math.h> int main () { double P,R,Y,M,X,A,MP,T,I; printf("Enter the Principle:\n"); scanf("%lf",&P); printf("Enter the Rate:\n"); scanf("%lf",&R); printf("Enter the Years:\n"); scanf("%lf",&Y); R = R/1200; M = Y * …

Member Avatar for kings_mitra
0
122
Member Avatar for alex1050

Suppose you want to develop a program to play lottery. The program randomly generates a Lottery of a two-digit number, prompts the user to enter a two-digit number, and determines whether the user wins according to the following rule: If the user matches the lottery in exact order , the …

Member Avatar for CoilFyzx
0
854
Member Avatar for alex1050

I need help understanding the for statements. This segment of code repeats itself as so 1 22 333 4444 However, i need understanding in how it repeats itself. Thanks [CODE]#include <stdio.h> int main () { int i,j; for(i=1;i<5;i++) { for(j=1;j<=i;j++) printf("%d",i); printf("\n"); } }[/CODE]

Member Avatar for tomato.pgn
0
75
Member Avatar for alex1050

//Enter phone number: 1-800-COL-LECT //1-800-265-5328 Im trying to input the dash right after COL and before LECT. Please help [CODE]#include <stdio.h> #include <stdlib.h> #include <math.h> int main() { char ch; printf("Enter Phrase\n"); while((ch=getchar())!='\n') { if ((ch=='1')) printf("1-800-"); else if((ch=='A')||(ch=='B')||(ch=='C')) printf("2"); else if ((ch=='D')||(ch=='E')||(ch=='F')) printf("3"); else if ((ch=='G')||(ch=='H')||(ch=='I')) printf("4"); else if …

Member Avatar for alex1050
1
280
Member Avatar for alex1050

[CODE]#include <stdio.h> cant figure it out, im trying to count all digits please help with this bugs int main() { int iochar, numdigits=0, numlower=0, numupper=0, numwhites=0; printf("Please enter a phrase:\n\n"); while((iochar=getchar())!=EOF) { if ((iochar='\o ')||(iochar='\t')||(iochar='\n')) { numwhites++; putchar(iochar); } else if((iochar>='0')&&(iochar<='9')) { numdigits++; putchar(iochar); } else if(('a'<=iochar)&&(iochar<='z')) { numlower++; putchar(iochar-32); …

Member Avatar for alex1050
0
82
Member Avatar for alex1050

What im trying is to input 'yes' to continue and reset all values or 'no' to exit the program but i have tried to figure it out but im having trouble please help.thanks [CODE]#include <stdio.h> #include <stdlib.h> #include <math.h> int main() { float num1,result; char sym; printf("Calculator Is ON\n"); do{ …

Member Avatar for alex1050
0
218