555
Yes because even if you didn't get an A you tried you best.
Of the 115 students int the sixth grade, 2 out of 5 belong to the Drama Club many students are members of the Drama Club?
int n1; int n2; int n3; int n4; int n5; int n6; int n7; int n8; int n9; int n10; int n11; int n12; int n13; int n14; int n15; int n16; int n17; int n18; int n19; int n20; int n21; int n22; int n23; int n24; int n25; int n26; int n27; int n28; int n29; int n30;
These are the two functions you need: public static int lcm(int i1, int i2) { return (i1*i2/gcd(i1,i2)); } public static int gcd(int i1, int i2) { // using Euclid's algorithm int a=i1, b=i2, temp; while (b!=0) { temp=b; b=a%temp; a=temp; } return a; }
void math(int*, int*, int*, int*) void main() { int a, b, c, d; puts("ENTER VALUES TO A & B"); math(&a,&b,&c,&d); printf("sum= %d \n diff= %d", c,d); getch(); } void math( int*a, int*b, int*c, int*d) { *c= *a+*b; *d= *a-*b; }
no obviously not its an exam
A)Int B)Long int C)Unsigned Int D)Float
Yes because even if you didn't get an A you tried you best.
The following example sets up a two-dimensional array, initialises it with some pseudo-random data, and then prints the table and the averages. #include<iostream> #include<time.h> int main() { const int max_students = 7; const int max_student_grades = 5; const int max_grades = 6; const char grade[max_grades]={'A','B','C','D','E','F'}; srand((unsigned) time(NULL)); // Initialise the array with pseudo-random grades: int table[max_students][max_student_grades]; for(int student=0; student<max_students; ++student) { for(int student_grade=0; student_grade<max_student_grades; ++student_grade) { table[student][student_grade] = rand()%max_grades; } } // Print the table and average the results. int overall=0; for(int student=0; student<max_students; ++student) { int average=0; std::cout<<"Student #"<<student+1; for(int student_grade=0; student_grade<max_student_grades; ++student_grade) { std::cout<<" Grade #"<<student_grade+1<<": "<<grade[table[student][student_grade]]<<", "; average+=table[student][student_grade]; } std::cout<<" Average: "<<grade[average/max_grades]<<std::endl; overall+=average; } std::cout<<"Overall average: "<<grade[overall/max_grades/max_students]<<std::endl; return(0); } Example output: Student #1 Grade #1: A, Grade #2: E, Grade #3: D, Grade #4: E, Grade #5: F, Average: C Student #2 Grade #1: E, Grade #2: D, Grade #3: E, Grade #4: E, Grade #5: E, Average: D Student #3 Grade #1: D, Grade #2: A, Grade #3: D, Grade #4: B, Grade #5: A, Average: B Student #4 Grade #1: C, Grade #2: B, Grade #3: A, Grade #4: A, Grade #5: B, Average: A Student #5 Grade #1: E, Grade #2: D, Grade #3: C, Grade #4: F, Grade #5: E, Average: D Student #6 Grade #1: C, Grade #2: D, Grade #3: A, Grade #4: F, Grade #5: A, Average: B Student #7 Grade #1: B, Grade #2: D, Grade #3: F, Grade #4: B, Grade #5: C, Average: C Overall average: C
No, you do not need to report a 1099-INT if the amount is 0.
// We can create structure with struct keyword struct abc { int roll_no; int maths_marks; int phy_marks; int chem_marks; }; int main(){ struct abc a; a.roll_no = 1; a.maths_marks = 90; a.phy_marks = 72; a.chem_marks = 80; printf(" Roll no - %d\n, Maths Marks %d\n, Phy marks %d\n, Chem Marks %d\n", a.roll_no, a.maths_marks, a.phy_marks, a.chem_marks); }
Of the 115 students int the sixth grade, 2 out of 5 belong to the Drama Club many students are members of the Drama Club?
int n1; int n2; int n3; int n4; int n5; int n6; int n7; int n8; int n9; int n10; int n11; int n12; int n13; int n14; int n15; int n16; int n17; int n18; int n19; int n20; int n21; int n22; int n23; int n24; int n25; int n26; int n27; int n28; int n29; int n30;
import javax.swing.JOptionPane; public class StudentGradesWeek7 { public static void main(String[] args) { String input = JOptionPane.showInputDialog ("Enter Student's grade in %"); int inputMark = Integer.parseInt (input); char g = getGrade (inputMark); JOptionPane.showInputDialog(null, "Student's grade is " + g); } private static char getGrade (int mark) { char grade; if (mark >=70) grade = 'A'; else if (mark >=60) grade = 'B'; return; } }
These are the two functions you need: public static int lcm(int i1, int i2) { return (i1*i2/gcd(i1,i2)); } public static int gcd(int i1, int i2) { // using Euclid's algorithm int a=i1, b=i2, temp; while (b!=0) { temp=b; b=a%temp; a=temp; } return a; }
int RevNum( int num ) { const int base = 10; int result = 0; int remain = 0; do { remain = num % base; result *= base; result += remain; } while( num /= base); return( result ); }
To calculate the least common multiple (lcm) of decimals (integers) and fractions you first need to calculate the greatest common divisor (gcd) of two integers: int gcd (int a, int b) { int c; while (a != 0) { c = a; a = b % a; b = c; } return b; } With this function in place, we can calculate the lcm of two integers: int lcm (int a, int b) { return a / gcd (a, b) * b; } And with this function in place we can calculate the lcm of two fractions (a/b and c/d): int lcm_fraction (int a, int b, int c, int d) { return lcm (a, c) / gcd (b, d); }