No one has voted on any posts yet. Votes from other community members are used to determine a member's reputation amongst their peers.
Hi. I need help to write one program in Assembly Mips. << read the characters typed by the user and store these characters a string. This string is later converted to an integer. If the user tries introducing non-valid characters (that is, other than the numerals 0 to 9) the … |
|
Read the age and weight of 5 people. Calculate the sum of the ages of people over 70 Kg #include <stdio.h> int i, age, weight, sum; main() { for( i=0; i<5; i++) { printf("Age: "); scanf("%d",&age); printf("weight (ex: 92.5): "); scanf("%d",&weight); if(weight>70) sum=sum+age; } printf("\age sum: %d", sum); return(0); } |
|
Receive a number from the keyboard and tell you if it is divisible by 10, 5, 2 or if it is not divisible by any of these. Why this dont work? #include <stdio.h> #include <stdlib.h> #include <math.h> main() { int num; printf("number: "); scanf("%d", &num); if (num % 10 == … |
|
Calculate the total area and volume occupied by a cylinder. Correct or not? #include <stdio.h> #include <math.h> int main() { float At, V, r, h; printf("\n ===========Calculate the total area and volume occupied by a cylinder============\n"); printf("\n the base radius.......: "); scanf("%f", &r); printf("\n Cylinder height.: "); scanf("%f", &h); At … |
|
Intend to carry out a simple online and print invoice to pdf. Suggestions are accepted ... |